How to manage positions openned manually using EA

Hi, if I remove the magic number in the EA settings will the EA manage a trade I take manuell?

The magic number of a manually-placed trade is 0.

So, depending on how your EA is coded, you could set the magic number setting to 0 and it would manage your manual trades.

if you want EA to control manual trade just filter order using symbol() and ordetype()

That means it would control manual trades and any others by any other EA, not good.

Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.)

Hello bstaddart0.

If you want to open trades manually and then manage them by EA then set Magic number = 0.

If EA doesn’t look for other orders attributes like an Order comments or Symbol name then it will “think” that it is his trades.

Original code

extern int Magic=0;

Modified code:

int Magic=0;

Thanks all for the help

Good luck and huge profits!