Grid Averaging (DCA) Forex Robot with Per-Order Take Profit (code GD-5003) is an EA for MetaTrader 4 and MetaTrader 5. It does not wait for an indicator signal: any side that is on and has no orders opens one right away, then spreads orders along a grid when price moves against it and takes profit on each order when price pulls back.
The BUY side and the SELL side run independently. On the BUY side, when price falls 5 points below the lowest BUY, the EA buys one more order with the same lot; the SELL side does the opposite, selling one more when price rises 5 points above the highest SELL. Each order has its own take profit 5 points from its entry, up to 100 orders per side.
Unlike RSI and MA Averaging (DCA) Forex Robot (GD-5001) which takes profit on the whole basket from the average price and increases the lot step by step, GD-5003 keeps a fixed lot and takes profit on each order. When price swings up and down within a range, the lowest orders (BUY) or highest orders (SELL) keep taking profit and reopening.
Default settings are made for gold XAUUSD. On brokers that quote gold with 3 decimals (for example 2650.125), 1 gold price point = 1000 points: a 5000 point step is 5 price points, and a 5000 point take profit is 5 price points. If your broker quotes gold with 2 decimals, 1 price point = 100 points, so divide the point settings by 10. For other symbols, adjust the step, take profit and maximum spread.
Example BUY side: buy 0.01 lot at 2650, price falls to 2645 and buys again, 2640 buys again. When price pulls back to 2645 the 2640 order takes +5 USD; at 2650 the 2645 order closes; at 2655 the first order closes, the BUY side has no orders left and the EA opens a new BUY right away at 2655. Meanwhile the SELL side does the opposite, so whether price goes up or down some order takes profit. Work out each order price, floating loss and account blow-up price in advance with the Gold grid calculator.
Risk of grid trading. If price keeps moving one way against a side, the number of orders grows and the loss grows quickly. With 0.01 lot, a BUY side with all 100 orders means price has fallen 495 points from the first order; at 20 orders (price down 95 points) that side is down about 950 USD, and each further point costs another 20 USD. Test on a demo account, choose the lot to match your capital and consider turning on the option to close a side at loss.
Turning a side off stops new orders on that side; existing orders still wait for their take profit. The EA uses no stop loss on individual orders and no Trailing Stop. One single file runs the 7-day demo trial and live trading once licensed. Every order carries the comment "www.HoangTrong.com" and the product's own magic number.