Doing some work on the ZigZag....
Wanting to DrawText on the chart when the isOverHighDeviation and values are true...
bool isOverHighDeviation = (deviationType == DeviationType.Percent && IsPriceGreater(highSeries[1], (lastSwingPrice * (1.0 + deviationValue * 0.01))))
|| (deviationType == DeviationType.Points && IsPriceGreater(highSeries[1], lastSwingPrice + deviationValue));
// Display true/false result
if (!isOverHighDeviation)
{
DrawText("highDeviationTag" + CurrentBar,false,"",0,High[0] + (TickSize*3),0,Color.Blue,new Font("Arial",7,FontStyle.Regular),
StringAlignment.Center,Color.Empty,Color.Empty,5);
}
else
{
DrawText("highDeviationTag" + CurrentBar,false,"H T",0,High[0] + (TickSize*3),0,Color.Blue,new Font("Arial",7,FontStyle.Regular),
StringAlignment.Center,Color.Empty,Color.Yellow,5);
}
It all works fine when I first load the indicator but doesn't continue to DrawText as the candles are land down.
I've only added the draw text code!!
Any ideas?
Thanks
Bruce
Comment