Thanks for clarifying that for me.
I would recommend taking a look at the following link. It is for an indicator called Alert for manually drawn lines. This has essentially what you are asking for in its code.
One note, manually drawn lines can be accessed from NinjaScript but not edited.
Heres the link: http://www.ninjatrader.com/support/f...d=4&linkid=472
Here is an example of getting the Y value from a Line that was manually drawn.
protected override void OnBarUpdate() { foreach (IDrawObject draw in DrawObjects) { //Print(draw.DrawType.ToString()); //prints out all the drawn objects on the chart if(draw.DrawType.ToString() == "Line") { ILine l = (ILine)draw as ILine; Print(l.EndY.ToString()); } } }
Leave a comment: