vertical line on chart
Posted: Apr 03 2021
hi
can one of you explain how to draw a vertical line on a chart
i post an example
with this example on TS you can draw this vertical line Using elsystem.drawingobject and elsystem.drawing;
![Image](https://i.goopics.net/800/kR0Xo.png)
thx for help
regards
can one of you explain how to draw a vertical line on a chart
i post an example
Code: Select all
Inputs: Line1(True), LineTime1(0830), String LineColor1("Gray"),
Line2(True), LineTime2(1100), String LineColor2("Red"),
Line3(True), LineTime3(1515), String LineColor3("Gray");
Using elsystem.drawingobjects;
Using elsystem.drawing;
Variables: VerticalLine VL(null);
Method void DrawVerticalLine() begin
VL = VerticalLine.Create(DTPoint.Create(BarDateTime,0));
VL.Persist = False;
DrawingObjects.Add(VL);
End;
If Line1 and T >= LineTime1 and T[1] < LineTime1 then begin
DrawVerticalLine();
VL.Color = Color.FromName(LineColor1);
VL.Style = StyleType.Dashed;
VL.Weight = 0;
End;
If Line2 and T >= LineTime2 and T[1] < LineTime2 then begin
DrawVerticalLine();
VL.Color = Color.FromName(LineColor2);
VL.Style = StyleType.Dashed;
VL.Weight = 0;
End;
If Line3 and T >= LineTime3 and T[1] < LineTime3 then begin
DrawVerticalLine();
VL.Color = Color.FromName(LineColor3);
VL.Style = StyleType.Dashed;
VL.Weight = 0;
End;
with this example on TS you can draw this vertical line Using elsystem.drawingobject and elsystem.drawing;
![Image](https://i.goopics.net/800/kR0Xo.png)
thx for help
regards