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:

  1. 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.

  2. 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.
Is this correct - I guess so.
 
Carl Schreiber:

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:

  1. 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.

  2. 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.
Is this correct - I guess so.

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.

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Requests to execute trade operations are formalized as orders. Each order has a variety of properties for reading. Information on them can be obtained using functions Position identifier that is set to an order as soon as it is executed. Each executed order results in a deal that opens or modifies an already existing position. The identifier of...
Reason: