Hi
Use the: SymbolInfoTick()
// To be used for getting recent/latest price quotes of a symbol MqlTick latest_Price; SymbolInfoTick("EURUSD" ,latest_Price); latest_Price.ask // your EURUSD ask price latest_Price.bid // your EURUSD bid price
function/struct to get the latest BID/ASK price of the chosen symbol.
You can use that price in the rest of your code to send the order.
"Ahmet Metin Yilmaz " "I just wonder why you need this"
You can use this for hedging strategies.
Greetings
Hi
Use the: SymbolInfoTick()
function/struct to get the latest BID/ASK price of the chosen symbol.
You can use that price in the rest of your code to send the order.
"Ahmet Metin Yilmaz " "I just wonder why you need this"
You can use this for hedging strategies.
Greetings
hi "Snelle Moda" i used EA of this code on GBPUSD chart but instead of EURUSD it opened order of GBPUSD...
MqlTick latest_Price;
SymbolInfoTick("EURUSD" ,latest_Price);
trade.Sell(1.0,NULL,latest_Price.bid,0,(latest_Price.bid-100 *_Point),NULL);
hi "Snelle Moda" i used EA of this code on GBPUSD chart but instead of EURUSD it opened order of GBPUSD...
MqlTick latest_Price;
SymbolInfoTick("EURUSD" ,latest_Price);
trade.Sell(1.0,NULL,latest_Price.bid,0,(latest_Price.bid-100 *_Point),NULL);
Because you have not specify the correct 'symbol' when you send the order with the trade.Sell function.
trade.Sell(1.0,NULL,latest_Price.bid,0,(latest_Price.bid-100 *_Point),NULL); Should be trade.Sell(1.0,EURUSD,latest_Price.bid,0,(latest_Price.bid-100 *_Point),NULL);

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use