How do I open and close multiple orders for a single account?

 

Hi,

I would like to learn how to alter a basic EA (say, the Simple MACD) to allow me to place multiple, concurrent orders for a given account. For example, if I want to be able to place an order for each different currency pair and not have any conflicts in terms of the order placing or order closing process.

I believe this has something to do with the OrderSend function and the "magic" parameter, but that's as far as I've gotten.

Any help on this would be great.

Thanks,

Ian

 

Magic Number mystery!

iboersma:
Hi,

I would like to learn how to alter a basic EA (say, the Simple MACD) to allow me to place multiple, concurrent orders for a given account. For example, if I want to be able to place an order for each different currency pair and not have any conflicts in terms of the order placing or order closing process.

I believe this has something to do with the OrderSend function and the "magic" parameter, but that's as far as I've gotten.

Any help on this would be great.

Thanks,

Ian

Ian,

I'm writing an article about the Magic Number mystery!

I've quoted your question in the article if you allow me?

Thanks!

CG

 
automatedtrader:
Heres what im wondering about MAGIC...ok i have 2 EAs exactly the same only difference is different take profits and trailing stops..I want to open 1 on EUR/USD and open the other on another chart but it needs to be EUR/USD so basically i have 2 EAs but they are the same they are named differently but the only other difference is take profits and trailing stops...is this possible it would seem with magic they would be... i mean i can manually enter 2 buy orders on EUR/USD even from 2 charts ''even the same chart'' with different settings and the ordertickets are different so it seems it would be possible

Sure, it's possible!

I'm writing an article right now about how to host multi expert advisors in the same instance of MetaTrader without conflict.

I'll give you the link when finished!

 

Heres what im wondering about MAGIC...ok i have 2 EAs exactly the same only difference is different take profits and trailing stops..I want to open 1 on EUR/USD and open the other on another chart but it needs to be EUR/USD so basically i have 2 EAs but they are the same they are named differently but the only other difference is take profits and trailing stops...is this possible it would seem with magic they would be... i mean i can manually enter 2 buy orders on EUR/USD even from 2 charts ''even the same chart'' with different settings and the ordertickets are different so it seems it would be possible..or would i have to make each currency an ea with a different MAGIC #

 

cool...i tried running 4 currencies 2charts apiece on 1minute i adjusted the magic on all of them different to no avail...it basically for money-management and so i can sleep knowing 1 of the 2 EAs for each currency is taking a profit and the other is running trailing stop..I will be awaitng your article..that would 8 EAs running,,unless i can have only 2 EAs and each one is running 4 currencies which would be fantasic