how to handle two groups of trades on same EA?
-
I'm trying to think how I can put all this in to one EA only...
Both groups are on same EA, same account, live simultaneously. Group 1 profit is separate from group 2. If group 1 hit 10 pip profit, exit group 1 only and re-enter new group 1 order. If group 2 hit it's 10 pip profit, exit group 2 orders, enter new orders (same type) for group 2. standard lots should be 10 for each cross.
Group 1
buy gbpusd
sell audusd
sell gbpaudGroup 2
sell gbpusd
buy audusd
buy gbpaud -
You are obviously aware of the term "Group" in the EAs, but I can see your EA and this is what you have now - http://prntscr.com/9mmmci
So, the issue is that when working with groups, the group number must be written in each trading block - blocks who put trades, blocks who close trades, blocks who filter trades, blocks who select trades. Because by default all blocks are set to work with a specific group, which is 0 (empty fields normally mean 0). Yes, 0 seems like nothing, but behind it there is a specific Magic Number and as we should know, when we work EAs (even with one EA + manually created trades), this can be the only thing that maps certain trades for certain EA. Otherwise if the EA decides to close all BUY EURUSD trades, it will close all BUY EURUSD trades created manually, by the EA or by any other EA
