In MQL4 for closing price you would use the function OrderClosePrice(), I want to use the same function in MQL5. Is this the correct function POSITION_PRICE_CURRENT?
#property script_show_inputs #include <HistoryPosition.mqh> // https://www.mql5.com/ru/blogs/post/755007 input long inTicket = 0; // Position Ticket void OnStart() { if (HistoryPositionSelect(inTicket)) Alert(HistoryPositionGetDouble(POSITION_HISTORY_PRICE_CLOSE)); }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register