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();

5 comments:

  1. Hi,

    How do I put it into my tick-based candle chart?

    It seems I must use 1-minute or higher only.

    thanks.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. Are you available to do some custom programming work on a 2-4 hour project?

    ReplyDelete