I wrote an indicator same as MACD indicator and it has one level that value is zero. I wrote this at BarUpdate method:
if (CrossAbove(Macd, Zero, 1) || CrossBelow(Macd, Zero, 1))
DrawText(CurrentBar.ToString(), "Crossed", 0, 0, Color.Black);
This code is fail, after little effort, i understand DrawText drawing text to price panel. I changed my code like this:
if (CrossAbove(Macd, Zero, 1) || CrossBelow(Macd, Zero, 1))
DrawText(CurrentBar.ToString(), "Crossed", 0, Close[0], Color.Black);
Actually i want to draw circle but firstly i'm trying to draw text object more than simple from circle object. How can i draw text at BarUpdate event via DrawText on osilator type indicator panel that not price panel?
At the same time i know if i override plot method wich Indicator base class virtual method. I can draw my objects on osilator panel via graphics.DrawXXX(). But I want to learn how can i drawtext on BarUpdate method or Why I can't do this if so?
Also, could you please tell me Ninja has any series about objects for plot objects automaticly? I mean ObjectSeries plots?
Best Regards.
Comment