Programming a custom indicator in a seperate window - page 2

 
Alexander Voronkov:

As one of the simplest solutions to this problem, can be performed using the ATR indicator with the settings of the currency pair.

Please see an example:


Thank you for your feedback! This is a great solution to this specific case. However, thinking long term, I would like to implement this in code so that I can generalize this view to more sophisticated indicators down the road
 
pstar This is a great solution to this specific case. However, thinking long term, I would like to implement this in code so that I can generalize this view to more sophisticated indicators down the road

He didn't give you a solution. You can't just use the ATR indicator; it only has a length parameter.

What he meant is that you write a indicator that draws a line using the values from iATR(symbol, _Period, length, iBarShift(symbol, _Period, Time[i]) where symbol and length are parameters (not _Symbol.) With that you can create the image he showed using multiple instances of it.

 
whroeder1:

He didn't give you a solution. You can't just use the ATR indicator; it only has a length parameter.


input string  symbol = "USDJPY";

buffer1[i]= iATR(symbol,0,14,i);
Is it not possible to do so?
Reason: