Thanks Joydeep, I'm still struggling, I've attached the piece of code and a picture of the error. It looks like I have to define anchor one somewhere, not sure why that would be.
#region Variables
private double lineTargetPR3 =0;
private bool showtargetonePR3 = true;
private double targetonePR3 = 0;
if (DrawObjects["PR3"] != null && DrawObjects["PR3"].DrawType == DrawType.Ray)
{
IRay alertLinePR3 = null;
IDrawObject drawAlertLinePR3 = DrawObjects["PR3"];
if (drawAlertLinePR3 != null && drawAlertLinePR3.DrawType == DrawType.Ray)
alertLinePR3 = (drawAlertLinePR3 as IRay);
lineTargetPR3 = showtargetonePR3 ? Instrument.MasterInstrument.Round2TickSize(alertLi nePR3.Anchor1Y) : targetonePR3;
DrawText("tag32", false,"PR3", -10,lineTargetPR3, -10,Color.White,new Font("Arial", 8, FontStyle.Bold),StringAlignment.Center, Color.Plum, Color.Black, 10);
alertLinePR3.Pen.Color = Color.Plum;
alertLinePR3.Pen.Width = 5;
alertLinePR3.Pen.DashStyle = DashStyle.Dot;
}
DrawTextFixed("uptick", lineTargetPR3.Anchor1Y.ToString("N0"), trPosition,Color.White, textFontMed, Color.White, Color.Green, 10);
DJ
Comment