Archive for April, 2010

Weird Cumulative Tick Plot: Distribution or Math Artifact?

April 23, 2010

Okay, this is making me scratch my head a bit. Here’s a plot of the ES with my “Messing around with Cumulative Tick” indicator on it, showing 1 hour bars since March 1:

There are two sub-panel indicators. The upper is showing a histogram of the high and low values of the NYSE Tick. There are also two lines. The green line is an EMA(20) of the high values of the Tick. The red line is an EMA(20) of the low values of the Tick. If the Tick high was above the high EMA, the Tick bar is green, else it’s gray. If the Tick low was below the low EMA, the Tick bar is red, else it’s gray. The third dashed white line is the mean of the high EMA and the low EMA.

This is graphically showing what is going on under the hood in the lower indicator, which is my cumulative tick indicator. If a Tick high is above the high EMA (showing as green), then the difference between the high and the EMA is summed. Opposite for the Tick lows. So basically the more extreme a spike in the Tick compared to the corresponding EMA, the more it will move the cumulative tick.

You can see that we’ve been in a consistent downward trend in the cumulative tick. The Tick spikes on the downside have far outweighed the spikes on the upside. Normally I would chalk that up to underlying weakness in the market, and stock distribution in the face of rising prices. But it has been persistent in the face of a strong uptrend. I noticed two things:

1. The high EMA is further from the zero axis, so the strong high Tick readings aren’t getting as much credit. The low EMA is closer to the zero axis, so the strong down Tick readings are getting maybe too much influence.

2. The mean of the high and low EMA’s is almost always above zero. The broad buying strength is showing up here, but not making its way into the cumulative tick calculation.

Back when I came up with this idea, I was assuming that the zero line would be the natural balance point for Tick readings. And in a sideways market, that’s probably true. In this bull phase, it seems to be based around +200. If the broad undercurrent is important, then I need to add it. If only the extremes are important (the rest being noise) then we could be seeing huge weakness under the market’s hood. I tend to think it’s the first, and that I need to add a trend component into the calculation.

What do you think? Is this highlighting a divergence in the markets, hidden stock distribution, or is it an artifact of the numerics of my calculation?

UPDATE: I added the value of the mean of the EMA’s into the calculation. At every bar, the upspike-downspike+mean is calculated. So a -300 net downspike will be tempered by a +200 upward mean value. Then the chart looks like this, and all is right with the world:

I updated the code in “Work in Progress” with the code I’m using for this. It’s the same indicator for both sub-plots. I just hid different plots for each one manually in the chart studies window.

Dr. Brett’s Price Targets for Think or Swim

April 6, 2010

Dr. Brett Steenbarger from Traderfeed recently put up a series of bonus posts covering how he calculates price targets. I made a Thinkscript that plots them for you according to the methodology in his posts. Dr. Brett says the posts are only available for a limited time, so check his links while they are still there.

There are four inputs:
fivedayrange = yes or no. If yes, then it uses a 5 day average value of the daily range. If no, it uses only the prior day’s range.

RS1coefficient = range multiplier for spacing out the R1 and S1 levels.
RS2coefficient = range multiplier for spacing out the R2 and S2 levels.
RS3coefficient = range multiplier for spacing out the R3 and S3 levels.

These coefficients are a multiplier on the range value to use (either prior day or 5 day average as chosen by the first input). Dr. Brett says that these numbers are found by correlating to past data. For ES/SPY, he uses 0.75, 1, and 1.25 for these numbers. The script will plot the pivot, the levels R1-R3 and S1-S3, the VWAP, and the prior day’s high and low.

If there’s enough demand, I could also make an excel backtesting template to get the correlation stats that he uses to tune the targets to the volatility of the particular symbol you are trading.

Download the free script “Dr_Brett_TargetsSTUDY.ts” from “Released Thinkscript Studies” at my Google site.