MT5 Buy Stop Orders

 

Hi, I am submitting buy stop orders at above current market price and I can see them as pending.

However, as it is a stop order (and not stop limit) I cannot set a limit at which I would allow a departure from the stop level.

Normally this is achieved with a STOP LIMIT order, MQL5 Order type BUY_STOP_LIMIT orders are different than the traditional.  What MT5 is doing is placing a Buy Limit order BELOW the stop level, which means there is a risk of missing the entry.

So how can I check the current bid-ask once the buy stop level has been triggered BEFORE it proceeds to an execution.

For example a BUY STOP is an order to buy at or above the BUY STOP level. Although it guarantees entry the risk is that it can be any

price above the BUY STOP (if there is a jump for example). Is there an event on MT5 that is between the BUY STOP trigger and the final execution so I could stop such order from executing if there is a big jump for example? 

 Thank you

 
Save the Stop Limit price and check the price e.g. 30 points 'before': if (ask> Stop Limit - 30.0*_Point)
 
cmarconetti: I am submitting buy stop orders at above current market price and I can see them as pending.

There is no need to create pending orders in code.

  1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)

    Don't worry about it unless you're scalping M1 or trading news.

  2. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.

Reason: