I'm plotting RayLines but on a specific moment the lines should end. (I know the Tag at that moment)
How can I convert this rayline into a line and change it endtime / endbarsago ??
foreach (IDrawObject draw in DrawObjects)
{
if (draw.Tag.StartsWith("line5") && draw is ILine)
{
ILine globalLine = (ILine) draw;
First store the old start to use it later with the line:
globalLine.StartTime
Then convert it to a line and set another endtime:
globalLine.DrawType = DrawType.Line;
globalLine.EndTime;
OR
Remove the drawobject
DrawLine with new values
}
}
Or can I forget the FOREACH and change it directly because I know it's TAG ? Something like:
DrawObjects["someTag"].DrawType = DrawType.Line
Hope someone can help me out or give me tips/examples....
Comment