MQ4 how to identify multiple groups of trades?

 


If there are only 2 horizontal lines, I can easily open new trades by the following condition :

if (Total_Sell() > Total_Buy() && Ask > upper_blue_horizontal_line)

{

        Open_New_Buy_Position();

}

Now there are 4 horizontal lines, how to separate the Total_Sell() and Total_Buy() between the blue horizontal line and red horizontal line?

Is it I have to use difference magic number for the 2 groups of trades?

But since CreateObject horizontal line can't assign magic number onto horizontal line, how can I know which magic number of trades is for which color of horizontal line?

Any solution? 

 
Eng Keat Ang: But since CreateObject horizontal line can't assign magic number onto horizontal line, how can I know which magic number of trades is for which color of horizontal line?

Encode the MN into the object's name.

 
William Roeder #:

Encode the MN into the object's name.

Thank you.

Reason: