Forum

Limit Mql5 Draw_Line in Specific Bars

I have problem with drawing line in custom indicator at the calculation event. If i draw a line in only just bar[1] = 20, bar[2] = 10 and [bar[3] = 11, the result is line at bar[0] and other bar up to rates_total is set to 0.0. double bar[]; //it's indicator buffer at calculation event: bar[1] =

Limit MQL5 Draw_line at the specific Bars

I have problem with drawing line in custom indicator at the calculation event. If i draw a line in only just bar[1] = 20, bar[2] = 10 and [bar[3] = 11, the result is line at bar[0] and other bar up to rates_total is set to 0.0. double bar[]; //it's indicator buffer at calculation event: bar[1] =