On this page
Overview
In this tutorial I build a cumulative TICK indicator for ThinkOrSwim from scratch. It keeps a running total of the NYSE TICK ($TICK) through the trading day, starts again from 0 each session, and plots the total in a lower pane as dots that turn cyan while the total rises and gray when it doesn't.
This is Episode 21 of our How to thinkScript series, and the finished study is 8 lines of code. It's for day traders who watch market internals and find the raw TICK too jumpy to follow by eye. Along the way I show how I look up each function in the thinkScript Learning Center, so you can write your next indicator yourself.
Key Takeaways
- The cumulative TICK indicator keeps a running total of the NYSE TICK ($TICK) during regular market hours, 9:30 to 4:00 Eastern, and starts again from 0 each day.
- Each bar adds the TICK's (high + low + close) / 3, read with
hlc3(symbol="$TICK"), to the total from the bar before. - The total plots in a lower pane as dots on a line: cyan when it is higher than on the previous bar, gray when it is lower or unchanged.
- The free download is 8 lines of thinkScript, including a gray dashed vertical line that marks each new day.
- In the video's made-up example, a +1,000 TICK reading at 6:45 Pacific still left the cumulative TICK at -200, because the readings before it added up to -1,200.
What Is the Cumulative TICK?
The cumulative TICK is a running total of the New York Stock Exchange TICK through the trading day. The NYSE TICK ($TICK in ThinkOrSwim) is the number of NYSE stocks ticking up minus the number ticking down at that moment. It's a market internal that traders read for buying and selling pressure: a positive reading leans to the buying side, and a negative reading leans to the selling side.
On a 1-minute chart, $TICK prints a new value on every bar, and the values are sporadic and jagged. Keeping track of them in your head is like counting cards in blackjack. The cumulative TICK does the counting for you: it adds each bar's reading to the total so far and shows the result as one line in its own pane.
In the video I walk through a made-up example. The market opens at 6:30 Pacific (9:30 Eastern) with a TICK of 0, so the cumulative TICK is also 0. Every 5 minutes, the new TICK reading is added to the total.
| Time (Pacific) | TICK reading | Calculation | Cumulative TICK |
|---|---|---|---|
| 6:30 | 0 | Market opens | 0 |
| 6:35 | -700 | 0 + (-700) | -700 |
| 6:40 | -500 | -700 + (-500) | -1,200 |
| 6:45 | +1,000 | -1,200 + 1,000 | -200 |
| 6:50 | -325 | -200 + (-325) | -525 |

At 6:45 the TICK printed +1,000, yet the cumulative TICK was still -200 because of the selling in the first 10 minutes. A single TICK reading describes one bar. The cumulative TICK shows where the whole session stands.
Why Track the TICK as a Running Total
The cumulative TICK puts the day's TICK readings on an aggregate basis. Many traders watch only the raw TICK, which is useful on its own, especially when it fires several bursts of +1,000 readings. The running total shows whether those bursts added up once the rest of the day is counted.
During live market hours, the cumulative TICK is where you start to spot divergences between price and the internals. Add overbought and oversold zones, which for us come from the Volatility Box, and you have more confidence to take a reversal. It's most useful for day trading, since it resets every session.
What the Cumulative TICK Indicator Plots
The cumulative TICK indicator plots one line of dots in a lower pane under your price chart. It has no inputs to set. The table lists each part of the plot and the code behind it.
| Part | What you see | Code |
|---|---|---|
| Running total | A dot for each bar, joined by a line | cumulativeTickPlot with Line_VS_Points |
| Cyan dot | The total is higher than on the previous bar | AssignValueColor |
| Gray dot | The total is lower than or equal to the previous bar | AssignValueColor |
| Blank space | No plot outside 9:30 to 4:00 Eastern, where the total is 0 | Double.nan |
| Dashed vertical line | A gray "New Day" line on the first bar of each day | AddVerticalLine |
Because each bar adds its own TICK value to the total, the color also tells you about that one bar. From the second dot of the day on, a cyan dot means that bar's average TICK reading was above 0, and a gray dot means it was 0 or below.
How to Add the Cumulative TICK Indicator to ThinkOrSwim
The cumulative TICK indicator is a free ThinkOrSwim study: import the downloaded .ts file, or paste the 8 lines from the Code tab into a new study.
- Download the .zip from this page. It holds one study file, TI_CumulativeTICKSTUDY.ts.
- Import the file as a study. Our guide on how to import a study into ThinkOrSwim walks through it.
- To build it yourself, open a chart (I used SPY), click the Studies icon at the top, and choose Create study.
- Give the study a name. I called mine TI cumulative TICK.
- Paste in the code from the Code tab, click Apply, then OK.
- Use an intraday chart. I built it on a 1-minute chart and also show it on a 5-minute chart. To edit the code later, click the scroll icon next to the study.
How the Cumulative TICK Code Works
The cumulative TICK code does 4 jobs: it reads the TICK, keeps a running total during market hours, plots the total in color, and marks each new day. The total follows 2 rules: it goes back to 0 when the market closes at 1:00 Pacific, and each new day starts from 0. The snippets below come from the download.
Every function here is documented in the thinkScript Learning Center. Search a function name to see its inputs, valid parameters and an example. That's how I worked out each line in the video.
Step 1: Put the Study in a Lower Pane
This step’s code is free with an account. Create one or sign in.
declare lower plots the study in its own pane below the price chart. TICK values are much larger than most stock prices and would skew the price axis.
Step 2: Read the TICK
This step’s code is free with an account. Create one or sign in.
hlc3 is built into ThinkOrSwim. It adds the high, the low and the close of a bar and divides by 3, an average TICK value for the bar. symbol="$TICK" reads the NYSE TICK instead of the symbol on your chart. To check the value, I added a temporary label:
This step’s code is free with an account. Create one or sign in.
The label showed -164.667 for the last 1-minute bar, and then I commented the line out. Our AddLabel tutorial covers labels in more detail.
Step 3: Keep a Running Total During Market Hours
This step’s code is free with an account. Create one or sign in.
SecondsTillTime takes one input, a time, and returns how many seconds are left until it. All times in thinkScript are Eastern, so 930 is the open and 1600 is the close, wherever you live. (The download spells the second one SEcondsTillTime; thinkScript ignores capitalization.)
A negative SecondsTillTime(930) means the bar is after 9:30, and a positive SecondsTillTime(1600) means it's before 4:00. On those bars, the line adds the current bar's tickData to cumulativeTickValue[1], the total from the bar before.
On every other bar, the total is set to 0, which resets it before the next session. On the 9:30 bar itself, SecondsTillTime(930) returns 0, so the count starts on the bar after it. Our tutorial on how to set custom hours in thinkScript covers time filters like this one.
Step 4: Plot the Total
This step’s code is free with an account. Create one or sign in.
I made the plot a separate variable from the running total so I could add conditions to it. When the total is 0, outside market hours, Double.nan plots nothing, so those bars stay blank.
Step 5: Add Dots and Colors
This step’s code is free with an account. Create one or sign in.
SetPaintingStrategy takes a list of valid style parameters. I picked Line_VS_Points, which draws a circle for each bar on the line, so each minute's value is easy to read.
AssignValueColor accepts a condition: if it's true, use one color, else use another. My first draft compared the plot to 0, and I changed it to compare against the previous bar, cumulativeTickPlot[1]. The test is a strict greater than, so a total that stays the same is gray too.
Step 6: Mark Each New Day
This step’s code is free with an account. Create one or sign in.
On a zoomed-out 5-minute chart, the plot breaks at the end of each day with no clear separation between sessions. GetDay() is built into ThinkOrSwim, and GetDay() != GetDay()[1] asks whether the day has changed since the previous bar. When it has, newDay is true.
AddVerticalLine takes a true/false condition, the text to show, a color, and a stroke style. I used gray, curve.Short_Dash and the text New Day, which is optional. The line overlaps the dashed day divider ThinkOrSwim draws on the price chart, which helps when you look back at past days.
How I Read the Cumulative TICK on a Chart
The cumulative TICK on its own doesn't do a lot of good: its value comes when you overlap it with other indicators and tools. The 2 colors help you time reversals once another tool agrees. In the video I showed the 2 reversal setups below on SPY and only mentioned the breakout pairing.
| Setup | Cumulative TICK | Second tool |
|---|---|---|
| Bearish reversal | Flattens at the top, then turns from cyan to gray | Edge Signals arrow |
| Bullish reversal | A long run of gray, then the change back to cyan | Bullish Edge Signals arrow |
| Bearish breakout | Falling with the breakout | A breakout indicator (mentioned in the video, not shown) |
With the Supply Demand Edge Indicator
Our free Supply Demand Edge indicator marks divergences between price and the internals. On the SPY chart in the video, a bullish arrow came in while the cumulative TICK was still declining, and the decline kept going as more bullish arrows printed.
Then the cumulative TICK started to flatten out, with another bullish arrow on the chart. Looking back at a chart, it's easy to stretch to paint a perfect picture, which is where the members-only Pro version takes the idea a step further.
With Edge Signals
For Volatility Box members, the Edge Signals arrows were the pairing I found most useful. In the bearish example, the cumulative TICK flattened out at the top, then made its first color change as an Edge Signals arrow printed, and SPY dropped hard after it.
In the bullish example, the cumulative TICK was declining in a stream of gray dots while bullish Edge Signals arrows suggested SPY was oversold. One arrow overlapped the change back to cyan, and that led to a fairly nice reversal.
With Breakout Indicators
In the video I also mention using the cumulative TICK with breakout indicators, without showing an example. Our free Simple Breakout Tool is one you could pair it with. When you see a bearish breakout, check whether the cumulative TICK is falling with it.
Treat a color change as a read on the internals, and wait for a second tool to agree before you act. Decide where your stop goes before you enter, and size the trade so a stop-out costs a small, fixed share of your account.
Cumulative TICK Pro and Other Markets
The Cumulative TICK Pro indicator is the members-only version of this study, built in Part 2 of this tutorial for Volatility Box members. In the video I mention what it adds: context at the end of each day on what to expect tomorrow, a read on whether to expect a trending or a choppy day, and the right TICK for the market on your chart. It's on the Cumulative TICK Pro tutorial page.
The free version reads the NYSE TICK, which is the one I use with SPY. If you trade other markets, the Nasdaq has its own TICK, and its symbol depends on the platform you use. Look it up, then replace $TICK in the tickData line with that symbol. The Pro version switches to the right TICK as you change markets.
Other Ways to Track the TICK
The cumulative TICK is one of several free TOS Indicators tools built on the NYSE TICK. Our Extreme TICK Counter counts the +1,000 and -1,000 TICK readings each day in 2 chart labels. To get a text message when the TICK reaches those levels, see how to create text alerts for extreme $TICK readings.
To keep a similar running count on a basket of stocks you pick, the Cumulative Advance Decline Trading System builds an anchored cumulative advance/decline line from 6 symbols you enter. For a chart example, read our research on a cumulative TICK divergence in the S&P 500.
Common Problems and Changes
- Nothing plots before the open or after the close. The total is 0 outside 9:30 to 4:00 Eastern, and the plot hides zeros. The 9:30 bar is blank too, since the count starts on the bar after it.
- The total is different on a 5-minute chart. Each bar adds one value, so a 1-minute chart adds 5 values in the time a 5-minute chart adds 1. The 2 totals aren't on the same scale, so compare days on the same timeframe.
- The hours look wrong for your time zone. thinkScript times are Eastern. Leave 930 and 1600 as they are, even if you trade from the West Coast.
- You want different colors. Change
color.cyanandcolor.grayin theAssignValueColorline.
Full thinkScript code
Create a free account or sign in to copy all 17 lines and download the file.
Download
Download the Cumulative TICK indicator for ThinkOrSwim. The download is a .zip with one study file, TI_CumulativeTICKSTUDY.ts. It holds the same 8 lines of code as the Code tab on this page: the running total of $TICK from 9:30 to 4:00 Eastern, the cyan and gray dots, and the New Day line. If you haven't added a custom study before, here's how to import an indicator into your ThinkOrSwim platform.
Questions
What is the cumulative TICK indicator?
The cumulative TICK indicator keeps a running total of the NYSE TICK ($TICK) through the trading day. Each bar's TICK value is added to the total from the bar before, between 9:30 and 4:00 Eastern, and the count starts again from 0 each day. In ThinkOrSwim it plots in a lower pane as cyan and gray dots.
How do I add the cumulative TICK indicator to ThinkOrSwim?
Download the free .zip from this page and import TI_CumulativeTICKSTUDY.ts as a study. To build it yourself, click the Studies icon on a chart, choose Create study, give it a name, paste in the 8 lines from the Code tab, and click OK. I used 1-minute and 5-minute SPY charts in the video.
How is the cumulative TICK calculated?
On each bar, the indicator takes the TICK's high plus low plus close, divided by 3, and adds it to the running total from the previous bar. That only happens between 9:30 and 4:00 Eastern. On every other bar the total is set to 0, so each new day starts from 0 and the previous day's total doesn't carry over.
What do the cyan and gray dots mean on the cumulative TICK?
A cyan dot means the cumulative TICK is higher than on the previous bar. A gray dot means it is lower or unchanged. Since each bar adds its own TICK value, from the second dot of the day on, cyan also means that bar's average TICK reading was above 0. I watch for the first color change after a long run.
What is the difference between the NYSE TICK and the cumulative TICK?
The NYSE TICK is the number of NYSE stocks ticking up minus the number ticking down, and on a 1-minute chart its readings are jagged and hard to follow. The cumulative TICK adds them up through the day. In the video's example, the TICK printed +1,000 at 6:45 Pacific, but the cumulative TICK was still -200 because the earlier readings totaled -1,200.
What cumulative TICK levels are bullish or bearish?
The free indicator doesn't mark levels. It shows direction: cyan while the total rises, gray while it falls. In the video I read reversals from a flattening total and the first color change, with another tool agreeing. Knowing what values are typical and what counts as an extreme is part of the members-only Cumulative TICK Pro version.
Can I use the cumulative TICK for the Nasdaq or other markets?
The free version reads the NYSE TICK ($TICK). The Nasdaq has its own TICK, and its symbol depends on the platform you use, so look it up and replace $TICK in the tickData line. The members-only Cumulative TICK Pro indicator uses the right TICK for the market on your chart and switches as you change markets.
Why doesn't the cumulative TICK show anything before the market opens?
The indicator only adds up the TICK between 9:30 and 4:00 Eastern. Outside those hours the total is set to 0, and the plot hides zero values with Double.NaN, so pre-market and after-hours bars stay blank. thinkScript times are Eastern, so leave 930 and 1600 alone even if you live in another time zone.
Goes with
Get each new indicator by email
One email on Sundays with the week's new tool and its code. A free account also unlocks every .txt download.
No credit card. Unsubscribe anytime.
Fair Value Gap
False Breakout Scanner
Heiken Ashi Trend



Stock Volatility Box
Futures Volatility Box
ORB Setups
Squeeze Setups
Extreme TICK Counter
How to Create Text Alerts for Extreme $TICK Readings
Supply Demand Edge
Cumulative Advance Decline Trading System
Backtesting the Put-Call Ratio and Transports Over a 10-Year Period
Option Chain Relative Value