Urgent ...need help on closing secondary trade...thanks

 

Hello,

Anyone can help me closing a secondary trade when to principal one start?

I have two different entries in my pilot. The main one need to be prioritized and the second one is on between two main entries.

I need something simple to close the secondary trade.

I’m using right now:

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

if (OrderType()==OP_SELL && OrderComment()==”main trade”) etc..etc…

But the result is not so good. I need something more efficient as I still wish to participate in the championship….Urgent.

Thanks!

 

put the parameters you use into arrays

 
solomun:

put the parameters you use into arrays

Thanks for you reply,

I'm still newbie in MQL4. what do you mind as "parameters you use into arrays". can you give me a example.

rayve.