Download MetaTrader 5

Multi Pair Buy/Sell order?

To add comments, please log in or register
Sherif Hasan
7387
Sherif Hasan  

Hi,

Is this possible to open multi orders for different pairs using single EA?

eg:

I would like to sell all USD pairs so when EA runs it must open Sell/SellStop/SellLimit USDJPY,USDCHF,USDCAD,etc...

if possible please give me suggetions to start coding myself?

I never coded for multi pair orders in single EA!

Please support me.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
Assign pairs to variable then open trades for each variable. Something like that.
whroeder1
15576
whroeder1  
sheriffonline: Is this possible to open multi orders for different pairs using single EA?
Yes but don't do it. You can't use any predefined variables and you have to check for ticks on the other chart. Can't assume pair(Time[0]) == chart(Time[0]) etc.
It's not necessary. Code it to trade the current part and put it on other charts. Done.
Sherif Hasan
7387
Sherif Hasan  
WHRoeder:
sheriffonline: Is this possible to open multi orders for different pairs using single EA?
Yes but don't do it. You can't use any predefined variables and you have to check for ticks on the other chart. Can't assume pair(Time[0]) == chart(Time[0]) etc.
It's not necessary. Code it to trade the current part and put it on other charts. Done.

Yes. understood. Thanks.
Mehmet Bastem
653
Mehmet Bastem  
sheriffonline:

Hi,

Is this possible to open multi orders for different pairs using single EA?

eg:

I would like to sell all USD pairs so when EA runs it must open Sell/SellStop/SellLimit USDJPY,USDCHF,USDCAD,etc...

if possible please give me suggetions to start coding myself?

I never coded for multi pair orders in single EA!

Please support me.

example:

 

OrderSend("USDJPY",OP_SELL,Lot,MarketInfo("USDJPY",MODE_BID),3,0,0,"SELL ORDER",0,0,CLR_NONE);
OrderSend("USDCHF",OP_SELL,Lot,MarketInfo("USDCHF",MODE_BID),3,0,0,"SELL ORDER",0,0,CLR_NONE);
To add comments, please log in or register