Hi
Use this to get the current BID, ASK price.
For STP brokers the BID price is used for the current market price as a reference punt.
// Info of the last tick. //----------------------- // To be used for getting recent/latest price quotes MqlTick Latest_Price; // Structure to get the latest prices SymbolInfoTick(Symbol() ,Latest_Price); // Assign current prices to structure // The BID price. static double dBid_Price; // The ASK price. static double dAsk_Price; dBid_Price = Latest_Price.bid; // Current Bid price. dAsk_Price = Latest_Price.ask; // Current Ask price.
You can also use this method:
// Info of the last BAR //--------------------------------- // Rates Structure for the data of the Last incomplete BAR MqlRates BarData[1]; CopyRates(Symbol(), Period(), 0, 1, BarData); // Copy the data of last incomplete BAR // Copy latest close prijs. double Latest_Close_Price = BarData[0].close;
Hi all,
I am developing an EA. I want to get the current price, please tell me how to get it.
I have read that Bid is the current market price, is that true,
Thanks.
double current_bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
double current_ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
The "current market price" is the bid/ask.
Hi all,
I am developing an EA. I want to get the current price, please tell me how to get it.
I have read that Bid is the current market price, is that true,
Thanks.
this can also help you
double Ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits); // Get the Ask Price
double Bid = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits); // Get the Bid Price
Hi all,
I am developing an EA. I want to get the current price, please tell me how to get it.
I have read that Bid is the current market price, is that true,
Thanks.
I find it weird that most comments here gave only bid/ask possibility.
Though the closest thing to currentPrice will generally be
double price =SymbolInfoDouble(_Symbol,SYMBOL_LAST);
or
SymbolInfoTick(Symbol(),last_tick) |

- www.mql5.com

- 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 all,
I am developing an EA. I want to get the current price, please tell me how to get it.
I have read that Bid is the current market price, is that true,
Thanks.