Pending order as market order

Roberto Jacobs  

Make the distance between the price of your pending order about 50-100 points from the current price, then your pending order will definitely be successfully placed. If it is too close to the current price, it will be rejected.

https://www.mql5.com/en/docs/constants/structures/mqltraderequest

Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Trade Request Structure - Data Structures - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
AnkiT  
Roberto Jacobs #:

Make the distance between the price of your pending order about 50-100 points from the current price, then your pending order will definitely be successfully placed. If it is too close to the current price, it will be rejected.

https://www.mql5.com/en/docs/constants/structures/mqltraderequest

Thanks Jacobs, are you aware about any ready script to apply this? I am not MQL programmer myself. 

Also, to be clear broker has 100 points restrictions for limitstop. So I am looking for script/ea/indicator which can read prices and allow me to have my own limitstop level so I can set the pending order in EA/Indicator/Script and it will trigger and send order as market order so no chances of rejections.

Roberto Jacobs  
AnkiT #:

Thanks Jacobs, are you aware about any ready script to apply this? I am not MQL programmer myself. 

Also, to be clear broker has 100 points restrictions for limitstop. So I am looking for script/ea/indicator which can read prices and allow me to have my own limitstop level so I can set the pending order in EA/Indicator/Script and it will trigger and send order as market order so no chances of rejections.

Here's an sample EA from Guru Vladimir Karputov https://www.mql5.com/en/code/20304

EA Stop Order
EA Stop Order
  • www.mql5.com
The Expert Advisor places a grid of pending Buy Stop and Sell Stop orders.
William Roeder  
AnkiT:

Hi, Is there any expert or script where I can place pending order and it will trigger order as market order.

Required this because some brokers don't allow placing pending orders near market, so the expert/script will allow me placing the order and will trigger it as market.

  1. Makes no sense, as a pending order becomes a market order when price hits.

  2. 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.)
    2. Don't worry about it unless you're scalping M1 or trading news.
    3. 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.
Skyler James Lee  
William Roeder #:
  1. Makes no sense, as a pending order becomes a market order when price hits.

  2. 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.)
    2. Don't worry about it unless you're scalping M1 or trading news.
    3. 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 orderIt make

It makes perfect sense to want to use market orders instead! Pending orders are not always filled and market orders allow for some slippage but ensure your orders are filled. There are several expert advisors that use pending orders instead, which I would agree is absurd, it is why I am here, looking for an ea that can delete pending orders and re-execute them as market orders.

Reason: