You are opening a pending order, there is no deal implied, so of course no deal price.
Alain Verleyen:
You are opening a pending order, there is no deal implied, so of course no deal price.
You are opening a pending order, there is no deal implied, so of course no deal price.
But eventually this order will be executed. In this case, is it possible to get the price at which the order was executed?
ENUM_POSITION_PROPERTY_DOUBLE
Identifier |
Description |
Type |
POSITION_VOLUME |
Position volume |
double |
POSITION_PRICE_OPEN |
Position open price |
double |
POSITION_SL |
Stop Loss level of opened position |
double |
POSITION_TP |
Take Profit level of opened position |
double |
POSITION_PRICE_CURRENT |
Current price of the position symbol |
double |
POSITION_SWAP |
Cumulative swap |
double |
POSITION_PROFIT |
Current profit |
double |
![Documentation on MQL5: Trade Functions Documentation on MQL5: Trade Functions](/i/community/logo_mql5_small.png)
Documentation on MQL5: Trade Functions
- www.mql5.com
Trade Functions - Reference on algorithmic/automated trading language for MetaTrader 5
lorenooliveira:
But eventually this order will be executed. In this case, is it possible to get the price at which the order was executed?
But eventually this order will be executed. In this case, is it possible to get the price at which the order was executed?
Of course, but that happens later, not when the pending is send.
You need to check history for deal prices.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
This is my code:
Even OrderSend() returning true and MqlTradeResult.retcode is TRADE_RET_DONE, I can´t get the price at which the real was actually executed. In the logs I can see that the order was executed. I can also confirm the order was executed through the feedback in the graph. However, mresult.price insists returning 0.0.
Does anyone know what I´m missing here?