How to create 2 magic numbers in 1 EA

Amgad Samir Nassief Abdelmalek
176

Hello, I want to use 2 strategies in one EA. So, I'll make 2 magic numbers 

for example Buy (Magic 1) will have Close position (Magic 1)

and Buy (Magic 2) will have close position (if Magic == Magic 2)

and the same with Sell

But how to use position orders to make it have Magic 1 or 2 ?

Michael Quinatadcan Macasil Macasil
352
Amgad Samir Nassief Abdelmalek:

Hello, I want to use 2 strategies in one EA. So, I'll make 2 magic numbers 

for example Buy (Magic 1) will have Close position (Magic 1)

and Buy (Magic 2) will have close position (if Magic == Magic 2)

and the same with Sell

But how to use position orders to make it have Magic 1 or 2 ?

i have system generated magic number in every symbol in every account. in your issues do you mean...
CTrade trade


trade.SetExpertMagicNumber(00001);
trade.buy(...);

trade.SetExpertMagicNumber(00002);
trade.sell(...);
Amgad Samir Nassief Abdelmalek
176
Michael Quinatadcan Macasil Macasil #:
i have system generated magic number in every symbol in every account. in your issues do you mean...

Thank you, yes that is what I mean