ORDER_TYPE_SELL_STOP_LIMIT or ORDER_TYPE_BUY_STOP_LIMIT
Just a question to be sure:
If I launch an ORDER_TYPE_SELL_STOP_LIMIT or an ORDER_TYPE_BUY_STOP_LIMIT pending order how do I properly get the relevant prices by OrderGetDouble(..) the example is a ORDER_TYPE_BUY_STOP_LIMIT so that the stop price is higher than the actual price and the second limit price is lower at least than the limit price:
- The moment the stop-price has not been triggered yet:
to get the stop price that triggers the limit order I have to use: ORDER_PRICE_OPEN (the highest price)
and to get the limit price: ORDER_PRICE_STOPLIMIT (the lower price) of the order. - Now that the stop price has been triggered I (only) have a normal (buy-) limit-order and now:
ORDER_PRICE_OPEN is the (remaining) price and was formally the ORDER_PRICE_STOPLIMIT price.
I've seen this in the docs somewhere , let me find it ,it stated that the prices are swapped once the limit order is armed.
I have now looked at: https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_property_double
Here is the English version a lot clearer than the German translation in the MQL-Referenz.
- www.mql5.com
Just a question to be sure:
If I launch an ORDER_TYPE_SELL_STOP_LIMIT or an ORDER_TYPE_BUY_STOP_LIMIT pending order how do I properly get the relevant prices by OrderGetDouble(..) the example is a ORDER_TYPE_BUY_STOP_LIMIT so that the stop price is higher than the actual price and the second limit price is lower at least than the limit price:
to get the stop price that triggers the limit order I have to use: ORDER_PRICE_OPEN (the highest price)
and to get the limit price: ORDER_PRICE_STOPLIMIT (the lower price) of the order.
ORDER_PRICE_OPEN is the (remaining) price and was formally the ORDER_PRICE_STOPLIMIT price.