Wednesday, March 11, 2009

Tick Behind Price Indicator

This is my tick behind price indicator that was inspired by Steenbarger's 2006 tick behind price display from tradestation.

Here was the original screen that inspired me:
Steenbarger's 2006 trade screen

Here are some examples of my indicator in ThinkOrSwim:

The most minimal example, probably the best according to my indicator design ideas.


Similar but with the tick plotted as candles using comparison in lower study. The lower study is somewhat redundant.


Below the graph on dark yellow background.


Behind price, with levels, all plots.

What The Indicator Displays:

Briefly, the indicator displays the TICK symbol behind the price. The indicator, also, plots a point when TICK is >= 1000 or <= -1000. These max/min values can be configured. The indicator can be configured to plot the high or low. I plot only the high on my chart behind price, this is just for direction -- either high, low, or close would work. The dots tell me when tick is at extremes. Finally, these maximum and minimum lines can be plotted.

For more information on trading the tick, please see Steenbarger's blog.

Configuring The Indicator For On Base Graph:

1. Add indicator to chart
2. Set "on base graph"
3. Set fit studies to screen ON
4. Set colors, dot sizes, etc.

Configuring The Indicator For Below Graph:

1. Add indicator
2. Turn on the hidden plots
3. Set colors, dot sizes, etc.

Variables Definitions:

tMax = The maximum plot line. Dots plotted for all tick values >= value
tMin = The minimum plot line. Dots plotted for all tick values <= value
tickMax = Max plot, horizontal line
tickMin = Min plot, horizontal line
tickHighP = Plot of high values of tick, line plot
tickLowP = Plot of Low values of tick, line plot
tickHighPoints = Plot points for high tick values
tickLowPoints = Plot points for low tick values

Adding the Indicator:

Go to edit studies, new study, and copy/paste the code.

The Code For Indicator:

# TICK Behind Price
# By. Curtis 
# http://tosindicators.blogspot.com/
# *******************************************************
# Thanks to:
# Dr. Steenbarger for idea &
# thinkscripter.wordpress.com for great example scripts
# traderfeed.blogspot.com for highest quality information
# *******************************************************

#TICK behind price
declare lower;

input tMax = 1000;
input tMin = -1000;

plot tickMax = 1000;
plot tickLow = -1000;

tickMax.SetDefaultColor(color.green);
tickLow.SetDefaultColor(color.red);

plot tickHighP = high("$TICK");
plot tickLowP = low("$TICK");
plot tickHighPoints = if tickHighP >= tickMax then tickHighP else double.nan;
plot tickLowPoints = if tickLowP <= tickLow then tickLowP else double.nan;

tickHighPoints.SetPaintingStrategy(paintingStrategy.Points);
tickHighPoints.SetDefaultColor(color.green);
tickHighPoints.SetLineWeight(3);
tickLowPoints.SetPaintingStrategy(paintingStrategy.Points);
tickLowPoints.SetDefaultColor(color.red);
tickLowPoints.SetLineWeight(3);

tickLowP.hide();
tickMax.hide();
tickLow.hide();

Indicator Design Thoughts

High quality indicators should have the highest signal to noise ratio without sacrificing fidelity. Great indicators will present the simplest and easiest to read signal that require the minimum time to process. Ideal formats for indicators would be simple case words such as [Trend, Range] or [Up, Down]. Some ideal indicator formats that are not in common use would be text with sound alerts, a numerical probability, or very simple graphs where all information is on screen and present.

Poor indicators will be redundant, overly complex, unclear, and excessive. Unfortunately, most indicators are poor and require expert level reading skills when the information is actually stupendously simple. Notorious are the indicators that display multiple lines that cross under or over because such signals are very easy to misinterpret and that would be especially true in high stress situations such as trading. Graphic indicators do have the advantage of displaying the past in a condensed form but trading is, also, about the present and the future and that is where indicator re-design could be very useful. I imagine indicator designers could get some inspiration from fighter jet heads-up-dispalys.


For great insight into indicators..

* Read Gary Smith's "How I Trade For A Living". He basically explains all the reasons popular indicators are useless or will become useless in the future.
* Steenbarger explains the value in simple trading screen
* Miller's take on indicators

About this Blog

I created this blog several years ago dedicated to ThinkOrSwim programming and indicator design. ThinkOrSwim is a fine platform for many tasks. However, my more recent work for OrderFlowDashPro required extreme programming, low level API, and customization which lead us to NinjaTrader -- which can be used for free! Visit our site to learn more!