Pending EA (Best Gold) - MetaTrader 5 Expert | Gold EA Download - MT4/MT5 Resources


Pending_tread Expert Advisor (EA) – Detailed Description
The Pending_tread EA is a versatile and easy-to-use trading robot designed to automatically place and manage multiple pending orders above and below the current market price arranged in a grid pattern. This EA is ideal for scalping strategies and can operate on any time frame or currency pair, making it highly flexible to suit various trading styles. This is good for XAUUSD.
Pending order grid:
The EA places a configurable number of pending orders above and below the current price (totalOrdersPerSide, default 10). This creates a "grid" of pending buy and sell orders to capture market movements in either direction.
Configurable distance between orders:
You can set the distance between each pending order using PipStep (expressed in points), allowing you to customize how tightly or widely the grid is spaced. For example, setting PipStep to 120 corresponds to 12 pips for 5 brokers.
Customizable order types:
The EA supports different trading directions for orders above and below the market.
Above Market: Place a buy stop or sell limit order (depending on your selection).
Below Market: Place a sell stop or buy limit order.
The pending order type logic is designed correctly to ensure that the order is placed at the appropriate price level relative to the current market price.
Profit per order:
Each pending order is assigned a take-profit level, which is calculated as a fixed number of points (take-profit points) of the order price. This allows automatic profit taking without manual intervention.
Lot size and slippage controls:
You can customize the lot size and maximum slippage allowed when orders are sent to your broker, allowing you to control your risk and execution parameters.
Order management and filtering:
The EA tracks existing pending orders for the current symbol and its own MagicNumber to avoid duplication or interference with other trades or EAs running on the same account.
Throttle mechanism:
To prevent excessive trading context calls, the EA limits its order placement attempts to once every 5 seconds.
Each time a quote is made, the EA checks whether the trading environment is free and whether enough time has passed since the last order was placed.
It calculates existing pending orders above and below the market grid.
It calculates the price levels for new pending orders at configured pip step intervals.
It places new pending orders up to the configured total per side and respects broker stop loss level limits to avoid placing orders too close to the current market price.
Each pending order contains a take profit set relative to the order price.
The EA continuously monitors and maintains this grid, and if an order is executed or canceled, orders are re-placed as necessary.
Scalping: Taking advantage of small price movements by being prepared to trigger multiple pending orders in either direction.
Range Trading: Automatically place buy and sell orders near key support/resistance levels.
Breakout Strategy: Capture breakouts by placing pending stop orders above and below the current price.
Important tips
This EA only manages pending orders; it does not manage open positions (currently there is no trailing stop or stop loss).
Use proper risk management and test the EA on a demo account before trading live.
The EA is best suited for brokers that support 5-digit or 4-digit pricing; adjust PipStep and take-profit points accordingly.
You will find this in MT4 as well. Just click: Pending Tread EA .
Attachment download
📎 pending_tread.mq5 (22.63 KB)
Source: MQL5 #61319
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •