I am trying to have a simple indicator which will highligh bar in chart if the bar´s range is bigger than multiple of ATR.
I have created this simple code:
protected override void OnBarUpdate()
{
double myATR = ATR (14)[1];
double myRange = Range () [0];
if ( myRange > (1.35*myATR))
{
DrawDiamond("tag1", true, 0, Low[0] - TickSize, Color.Black);
}
else
{
}
However nothing is drawn in the chart. Could you kindly point out where did I make a mistake?
Thank you.
Comment