I think you mean, How to open orders for other pairs using one chart ?
If so, use, MarketInfo( ) ...
I think you mean, How to open orders for other pairs using one chart ?
If so, use, MarketInfo( ) ...
Sort of,please can u elaborate
Do you have coding knowledge? at least few ?
If you have, you just need to use MarketInfo( ) as I mentioned before ...
Otherwise, no way other than putting your code here to help you ...
Do you have coding knowledge? at least few ?
If you have, you just need to use MarketInfo( ) as I mentioned before ...
Otherwise, no way other than putting your code here to help you ...
not really,i m using the following,please see how can it be done.
The above code is an indicator ... If you want to open a trade for example on "EURUSD" when the condition you are waiting is detected from the indicator,
then in the code of your EA, go to the lines where the EA open orders, for example, like this .....
res = OrderSend(Symbol(),OP_BUY,Lot,Ask,3,sl,to,ea_comment,MagicNo,0,Blue);
and replace it with some code like this ...
res = OrderSend(Symbol(),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("USDCAD",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("AUDUSD",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("USDJPY",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("EURJPY",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("GBPJPY",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue);
Be sure that all pairs you want to trade are shown in the Market Watch window in your MT4 platform.
there r no such code in my indicator,i open trade manually.
and that's what i want,when I open certain trade of any curreny pair,then it should automatically open trade in other pairs.
my profile looks something like this
now if in this,i open certain trade for EURUSD,it should automatically open trade in other pairs
and replace it with some code like this ...
res = OrderSend(Symbol(),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("USDCAD",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("AUDUSD",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("USDJPY",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("EURJPY",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend(MarketInfo("GBPJPY",MODE_ASK),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue);
res = OrderSend(Symbol(),OP_BUY,Lot,Ask,3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend("USDCAD",OP_BUY,Lot,MarketInfo("USDCAD",MODE_ASK),3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend("AUDUSD",OP_BUY,Lot,MarketInfo("AUDUSD",MODE_ASK),3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend("USDJPY",OP_BUY,Lot,MarketInfo("USDJPY",MODE_ASK),3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend("EURJPY",OP_BUY,Lot,MarketInfo("EURJPY",MODE_ASK),3,sl,tp,ea_comment,MagicNo,0,Blue); res = OrderSend("GBPJPY",OP_BUY,Lot,MarketInfo("GBPJPY",MODE_ASK),3,sl,tp,ea_comment,MagicNo,0,Blue);
You might also want to check the result of each OrderSend().
there r no such code in my indicator,i open trade manually.
and that's what i want,when I open certain trade of any curreny pair,then it should automatically open trade in other pairs.
my profile looks something like this
USD profile
now if in this,i open certain trade for EURUSD,it should automatically open trade in other pairs
As you are thinking to open order/orders, this means you need an EA or script.
You can't do that using the indicator directly !.
You need to code an EA by linking this indicator to it (if you like) then you feed the EA with the logic to open the other pairs using one/current chart.
You might also want to check the result of each OrderSend().
Sure :)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
is there any code base available which could directly open multiple trade on different currency pair based on any single trade pair.
for eg :
suppose I put up any tarde at certain moment for EURUSD,then at the same time multiple trade could be opened with other USD pairs(AUDUSD,GBPUSD,NZDUSD,USDCAD,USDCHF,USDJPY)