Your error is that you specify Ask price for the charted pair (apparently EURUSD), not for USDJPY.
Bid and Ask are variables that hold prices for the pair on the chart.
See MarketInfo() to get the Bid and Ask for any pair.
Hi!
This is my code:
This code orders EURUSD only. How can I order the USDJPY too?
Thanks
string parite;
paritex="EURUSD";
ticket1=OrderSend(parite,OP_SELL,lots,Marketinfo(paritex, MODE_BID),1,0,0,"",0,0,Green);
paritex="USDJPY";
ticket2=OrderSend("parite",OP_BUY,lots,Marketinfo(paritex,MODE_ASK),1,0,0,"",0,0,Green);
i am using in. no problems.
OrderSend("USDCHF", OP_BUY, LotMiktari, MarketInfo("USDCHF", MODE_ASK), 3, 0, 0);
OrderSend("EURUSD", OP_BUY, LotMiktari, MarketInfo("EURUSD", MODE_ASK), 3, 0, 0);
OrderSend("GBPUSD", OP_BUY, LotMiktari, MarketInfo("GBPUSD", MODE_ASK), 3, 0, 0);
OrderSend("EURJPY", OP_BUY, LotMiktari, MarketInfo("EURJPY", MODE_ASK), 3, 0, 0);
OrderSend("GBPJPY", OP_BUY, LotMiktari, MarketInfo("GBPJPY", MODE_ASK), 3, 0, 0);
OrderSend("AUDUSD", OP_BUY, LotMiktari, MarketInfo("AUDUSD", MODE_ASK), 3, 0, 0);
OrderSend("NZDUSD", OP_BUY, LotMiktari, MarketInfo("GBPJPY", MODE_ASK), 3, 0, 0);
OrderSend("EURCAD", OP_BUY, LotMiktari, MarketInfo("AUDUSD", MODE_ASK), 3, 0, 0);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
This is my code:
This code orders EURUSD only. How can I order the USDJPY too?
Thanks