Looking for some assistance if possible for something I am trying to achieve with a custom indicator. In a nutshell... I am trying to add a number (text) below bar, just a sequence of numbers if a condition is true. Like so:
if something is true { if (close[0] < close[2]) { //label the bar with numbers from 1-20 } }
I know I can use Draw,Text to add these labels:
... if (close[0] < close[2]) { Draw.Text(this, "tag.C.B1" + CurrentBar, true, "1", 0, Low[0] - (((ATR(14))[0])*1.75), 20, Brushes.Red, new SimpleFont("Arial", 12),TextAlignment.Center,Brushes.Transparent, Brushes.Transparent, 0); }
I thought about using a counter (int counter = 0) and incrementing it every-time the condition is true.... but the Draw.Text needs a 'string' for the number "1", I cant simply enter the 'counter' variable, instead of "1".
Any ideas on a possible solution ?
Thanks in advance
AK
Comment