I'm writing an EA, modifying my EA written for MT4. I open an order using OrderSend.
Simply if I need to understand (perhasps from History), if the order sent (by the way.... I have to check Order, Deals or Position?), has been closed because it has reached StopLoss. I checked on forums, but I have not found what I need....
A deal is the reflection of the fact of a trade operation execution based on an order that contains a trade request. Each trade is described by properties that allow to obtain information about it. In order to read values of properties, functions of the Identifier of a position, in the opening, modification or closing of which this deal...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I'm writing an EA, modifying my EA written for MT4. I open an order using OrderSend.
Simply if I need to understand (perhasps from History), if the order sent (by the way.... I have to check Order, Deals or Position?), has been closed because it has reached StopLoss.
I checked on forums, but I have not found what I need....
ORDER_PRICE_CURRENT
gives only the current price of the order symbol
that cannot be compared to ORDER_SL. I suppose ORDER_PRICE_CURRENT is only the current price of symbol and not the Order close price .
Thanks to all for your support.
Result
Forum on trading, automated trading systems and testing trading strategies
Last two orders
fxsaber, 2017.12.23 11:02
Addon for MT4