I went through the wizard and set up the indicator's variables:
one to call the value of the ATR
one that sets the number of bars used in the ATR calculation
one that keeps track of the above/below position of the indicator
one for the multiple of the ATR to be used
one for the volatility value of the indicator
The idea comes straight out of Technical Analysis by Kirkpatrick/Dahlquist pg 260.
The indicator will have a value equal to some multiple times the value of the ATR. For example exit value = 4.5 x ATR.
So if say the current trend has reversed from short to long (because it was stopped out) and that price is $17 and the 14-period ATR value is 0.625 then the volatility value of the indicator will be
0.63 x 4.5 = 2.84
Thus the indicator value initially will be
$17 - 2.84 = 14.16
which will be drawn as a dot and is where a stop order would be placed.
Each new bar where the price increases or the volatility decreases will draw the stop value higher.
Here is a graph taken from the book to better illustrate what I am after.
Can someone outline the process of how to program this in NT? I am not asking for the code to be written, but just an overview like:
where do the variables go, where do the calculations go, how to call the ATR indicator....
A little knowledge like that could go a long long way. TIA.
Comment