Currently this EA works as expected with only 'One' pair. But if I attach it with 'Multiple' pairs it fails to work according to my plan.
My plan is: The EA will Open 3 simultaneous orders with 3 different Take Profit. Then if the market moves certain pips in profit, then the Stop Loss of 'First Two' trades move say 1 pip profit.
Now if the First Two trades got closed either by Hitting Take Profit or Stop Loss (trailed Stop Loss), then the Stop Loss for 'Third Trade' will move to say 1 pip profit.
Now the way I designed it, it's working with Single Pair but failing to do so while it's trading Multiple Pairs because then the 'OrdersTotal()' function is fetching all the open orders.
So please assist me to make things work for Multiple pairs.
Thanks
My plan is: The EA will Open 3 simultaneous orders with 3 different Take Profit. Then if the market moves certain pips in profit, then the Stop Loss of 'First Two' trades move say 1 pip profit.
Now if the First Two trades got closed either by Hitting Take Profit or Stop Loss (trailed Stop Loss), then the Stop Loss for 'Third Trade' will move to say 1 pip profit.
Now the way I designed it, it's working with Single Pair but failing to do so while it's trading Multiple Pairs because then the 'OrdersTotal()' function is fetching all the open orders.
So please assist me to make things work for Multiple pairs.
Thanks
Attached File(s)
Expert A.mq4
14 KB
|
193 downloads