Hi,
I would like to draw a segment at the 5 min bar 12:00 – 12:05 at the high +2 and at the low -2
and I would like it to be 5 bars forward in time and a horisontell line
I would say that this is drawing at BarIndex+5.
But you then also would need to set the right margin of the chart to 5 bars (this is by default set at 2).
If you need more help, just ask (others will be able to help too).
JSParticipant
Senior
Hi @Sprattelgubbe,
DefParam DrawOnLastBarOnly = True
DrawSegment(BarIndex,High+2,BarIndex+5,High+2)Coloured(0,255,0)
Drawsegment(BarIndex,Low-2,BarIndex+5,Low-2)Coloured(255,0,0)
Return
Thank you both for your answers, now it works as I wanted it to do.
I was pretty close in the code I had done, but you nailed it.