draw few horizontal lines

 

Hi all,

i'm a beginer at mql programming, so i'm sorry in advance if i missed something, but i need to build an EA that works on support/resistance lines. Basically, i need to draw 2 horizontal lines for the first channel, and draw a new one at the channel size every time the next candle closes above/down the previous lines.

example:

double channel_top;

double channel_bottom;

double channel_size;


channel_size = channel_top - channel_bottom;

if(PRICE_CLOSE > channel_top)

draw a line at (channel_top + channel_size)


the issue is that i need to draw several lines, as the price moves up or down, and if i use ObjectCreate, i need to state every line, and i need something to draw the line as needed. I don't know if i've explained it right.

Reason: