And first of all happy holidays!
I built an indicator which draws vertically stacked numbers in my chart. The distance between the numbers is something I can adjust in my indicator by changing the "dista" value (see below) from for example 10 to 16, 24 or higher depending on market movements.
DrawText("collab5", false, "15", 1, Lows[0][1]-(dista*1)*TickSize, 0, uplr, new Font ("Arial", 7, FontStyle.Bold),StringAlignment.Near, uplr, Color.Empty, 0);
DrawText("collab6", false, "30", 1, Lows[0][1]-(dista*1.5)*TickSize, 0, uplr, new Font ("Arial", 7, FontStyle.Bold),StringAlignment.Near, uplr, Color.Empty, 0);
DrawText("collab7", false, "60", 1, Lows[0][1]-(dista*2)*TickSize, 0, uplr, new Font ("Arial", 7, FontStyle.Bold),StringAlignment.Near, uplr, Color.Empty, 0);
Now my question. Is there a simple way to use the value from the ATR indicator in my indicator to replace "dista" so that the distance practically adjusts itself based on market movement rather than me having to do it manually.
If so, could you provide a sample code/snippet with which I could work as I am not really a programmer.
sandman
Comment