VI

Robot Forex trend pyramiding EA

Pyramiding EA for gold: opens the first order when two moving averages cross, adds orders as price moves in the right direction, moves the stop loss of the whole basket after each add to lock in profit, one shared take profit based on the first order price.

Robot Forex MT4MT5 GD-5501v1.0 Lifetime 7-day trial 23/11/2026
Trend pyramiding by MA–BasketBUYSELLOrders3 / 50 / 5Total lot0.03-First order price2650.000-Next add at2656.000-Next lot0.01-Basket stop loss2652.100-Basket take profit2700.000-Profit / loss+9.00-Distance · added lot2000 points · same lotAfter adding, move stop lossTo previous order +100Waiting for an MA crossover to open a new basket10:20 Opened BUY 0.01 lot, added order 3 of the basket
The EA panel on the MetaTrader chart (sample data: BUY basket of 3 orders at 2650, 2652, 2654, current price 2655). The panel can be dragged; click the top-right button to collapse it.
GD-5501 1.00 (XAUUSD,H1)
CommonInputs
VariableValue
ab========================================GENERAL SETTINGS
01Magic number (per product code)
01Max spread (point, 0 = ignore)
abNew basket hours (server time)
Signal timeframe
ab========================================FIRST ORDER: TWO MOVING AVERAGES CROSSING
01Fast MA period
Fast MA type
01Slow MA period
Slow MA type
Applied price
Crossover: cross up BUY, cross down SELL
Reverse: cross up SELL, cross down BUY
Trade direction
ab========================================PYRAMIDING
½First order lot
Lot of added orders
½Decreasing: multiply by (0.1 - 1)
01Add when price moves the right way (point)
01Max orders per basket (incl. first order)
Only add while MA still follows the basket
ab========================================BASKET TAKE PROFIT AND STOP
01Take profit: from first order (point, 0 = off)
01First order stop loss (point, 0 = off)
After adding, move basket stop loss
01Move stop loss: extra (point)
Close basket when the two MAs cross the other way
ab========================================WEEKEND
No new basket from time below (Friday)
Close all baskets from time below (Friday)
abFriday time (server time)
ab========================================OTHER SETTINGS
Notify phone on order open / close
LoadSave

How the EA works

BUY and SELL each have their own basket. A basket goes through 3 steps: open the first order on a signal, add orders as price moves the right way, move the basket stop loss to lock in profit until take profit or stop loss is hit.

Whole basket closed, profit ~10 USD Basket take profit 2700 Basket stop loss 2656.1 Order 1 · 2650 Order 2 · 2652 Order 3 · 2654 Order 4 · 2656 Order 5 · 2658
Example BUY basket with default gold settings: after each add, the basket stop loss moves up to the previous added order price. Price turns and hits 2656.1, the whole basket closes, still about 10 USD in profit.
  1. 1Open a new basket

    First order when two moving averages cross on a closed candle, stop loss 5 points of price, take profit 50.

    • BUYEMA 10 crosses above EMA 50
    • SELLEMA 10 crosses below EMA 50
  2. 2Pyramiding

    Price moves the right way 2 from the latest order, the EA adds one, up to 5 orders per basket.

    • BUYPrice 2 above the highest order
    • SELLPrice 2 below the lowest order
  3. 3Move stop loss, shared take profit

    After each add, the basket stop loss moves to the previous added order price + 100 points. All orders share one take profit.

    • BUYTake profit = first order + 50
    • SELLTake profit = first order - 50
  • One basket per direction: while a BUY basket runs, new BUY signals are skipped.
  • When the two MAs cross the other way, the running basket closes and a basket in the new direction opens (can be turned off).
  • After the 2nd order the basket can still lose a little if price turns right away; from the 3rd order on, the basket has locked in profit.
  • From 20:00 on Friday (server time) no new baskets open; turn on the extra option to close all baskets before the weekend.
First order on MA crossover

Fast MA (EMA 10) crossing above slow MA (EMA 50) opens a BUY basket, crossing below opens a SELL basket. Reverse mode available.

Adds only while in profit

When price moves the right way 2000 points (2 gold dollars) from the latest order, the EA adds one order in the same direction, up to 5 orders per basket. If price moves against it, nothing is added.

Stop loss moved to lock profit

After each add, the stop loss of the whole basket moves to the previous added order price (or the basket break-even price), plus 100 points. The stop loss only moves in the favorable direction.

Shared take profit from the first order

Every order in the basket shares one take profit, 50000 points (50 gold dollars) from the first order price. It is placed on the broker server, so it still closes when your computer is off.

Same or decreasing lot

Added orders use the first order lot, or get smaller by a factor (default 0.7) so later orders do not give back much of the profit already made.

Independent BUY and SELL baskets

BUY and SELL baskets run separately. Option to close a basket when the two MAs cross the other way; at the weekend, no new basket or close everything from 20:00 Friday.

Overview

Robot Forex trend pyramiding EA (code GD-5501) is an EA for MetaTrader 4 and MetaTrader 5. The first order opens when two moving averages cross on a closed candle: the fast MA (default EMA 10) crossing above the slow MA (default EMA 50) opens a BUY basket, crossing below opens a SELL basket. The signal is the same as MA Crossover Forex Robot (GD-8802).

Pyramiding is the opposite of averaging down: the EA only adds orders while the basket is in profit. When price moves the right way 2 from the latest order, the EA opens one more order in the same direction, up to 5 per basket. After each add, the stop loss of the whole basket moves up to the previous added order price plus 100 points, so if price turns, the earlier orders have already locked in profit. All orders share one take profit 50 from the first order price.

Default settings are made for gold XAUUSD. With brokers quoting gold with 3 decimals (for example 2650.125), 1 gold dollar = 1000 points: an add distance of 2000 points is 2, a first order stop loss of 5000 points is 5, a take profit of 50000 points is 50. With 2 decimals, 1 dollar = 100 points, so divide the point settings by 10. For other symbols, adjust the distance, stop loss, take profit and maximum spread.

Example BUY basket with 0.01 lot per order: order 1 buys at 2650 (stop loss 2645, take profit 2700). Price rises to 2652, the EA buys again and the basket stop loss moves to 2650.1; at 2654 it buys again, stop loss to 2652.1; at 2658 the basket has 5 orders and the stop loss is at 2656.1. If price turns and hits 2656.1, the whole basket closes with about 10 USD profit. If price keeps going to 2700, all 5 orders take profit, about 230 USD.

Note. After the 2nd order the stop loss sits at the first order price, so if price turns right away the basket still loses a little (about 1.8 USD in the example above); only from the 3rd order on does the basket lock in profit. Sideways moves around the add distance can hit the stop loss early. Test on a demo account and adjust the add distance to gold volatility.

One single file for the 7-day demo trial and live trading with a license. Every order has the comment "www.HoangTrong.com" and the product's own magic number. The panel on the chart shows both baskets: number of orders, first order price, next add price, basket stop loss and take profit, profit / loss.

Changelog

Version 1.023/11/2026

First release of Robot Forex trend pyramiding EA.

  • First order on MA crossover
  • Adds only while in profit
  • Stop loss moved to lock profit
  • Shared take profit from the first order
  • Same or decreasing lot
  • Independent BUY and SELL baskets

FAQ

Is the trial version different from the full version?

No. Each product has a single file. Without a license it runs for 7 days on a demo account. Buy a license for your account ID and it runs on your live account, no new download needed.

What is WebRequest and why does the EA need it?

WebRequest is the permission that lets an EA connect to an address on the internet. HoangTrong.com EAs use it to activate the license, then check themselves offline. See how to enable WebRequest.

How do I activate the license?

Buy a license for the correct MetaTrader account ID, then click Activation in the EA. You don't need to enter or store any key. After reinstalling, just activate again.

What if I want to use the EA on another account ID?

A license is permanently tied to the account ID it was bought for. To use the EA on another ID, buy an extra ID right on the product page: if you already own the license, each extra ID costs only 100,000 VND.

Multi-account licenses

Extra IDs only 100,000 VND/ID

Each license includes 1 account ID. Each extra ID is only 100,000 VND, for both retail and COMBO prices, valid forever.

  1. What is an account ID?It's your MT4/MT5 login number, shown in MetaTrader and in the email the broker sends when you open the account.
  2. Buy several IDs at onceEnter IDs separated by commas, for example 12345678, 87654321. Up to 20 IDs per order.
  3. Add IDs laterOnce you have a license, come back to this page, enter the new ID and click Buy a license. You're only charged 100,000 VND per ID, not the license price again.
Buying extra IDs: sign in firstSign in with the website account you bought the license with to get the 100,000 VND per ID price. With a different website account, the system cannot see your license and charges the full license price.
Example1 ID3 ID
Retail price500,000 VND700,000 VND
COMBO price5,000,000 VND5,200,000 VND
Add IDs later100,000 VND per ID (signed in)

Besides Robot Forex trend pyramiding EA

Other products from HoangTrong.com

View all products
GD-8801Indicator-basedMT4MT5

RSI Overbought Oversold Forex Robot

The EA opens BUY and SELL orders on RSI signals in the overbought and oversold zones, with built-in stop loss, take profit, break-even and Trailing Stop.

  • 3 RSI entry scenarios, each can be switched on or off
  • Stop loss, take profit, break-even and Trailing Stop
  • Limits on order count, trading hours, spread, 1 order per candle
Retail price500,000 VND
Details
GD-8805Indicator-basedMT4MT5

Multi-Timeframe RSI Forex Robot

EA opens orders on RSI overbought and oversold signals, filters signals with the RSI of 5 timeframes switched on or off separately, multi-timeframe RSI table right on the chart.

  • 3 RSI entry scenarios, same as GD-8801
  • 5 RSI filter timeframes, each with its own inputs and on/off
  • Multi-timeframe RSI table on the chart, unused filters clearly marked
Retail price500,000 VND
Details
GD-8802Indicator-basedMT4MT5

MA Crossover Forex Robot

The EA opens BUY and SELL orders when the fast MA crosses the slow MA, with built-in stop loss, take profit, break-even and Trailing Stop.

  • BUY when the fast MA crosses up, SELL when it crosses down
  • Separate period and MA type for each line
  • Stop loss, take profit, break-even and Trailing Stop
Retail price500,000 VND
Details

Need a different feature?

Order a custom EA built on your strategy, priced per feature.