Gold Pyramid30
- Experts
- Versione: 1.27
- Attivazioni: 5
Gold Pyramid30
Gold Pyramid30 is a MetaTrader 5 Expert Advisor that combines multi-timeframe trend confirmation, fixed-volume pyramiding and ATR-based stop management. XAUUSD on an H1 chart is the intended setup for evaluation.
Trading method
The EA identifies direction using the fast and slow EMAs on H4. Entry confirmation uses EMAs, RSI and the previous closing price on M15. Indicator signals are calculated from completed candles.
The system opens an initial position when its directional conditions are met. It may add another position in the same direction when the latest position reaches the configured floating-profit threshold, the signal remains valid and the minimum interval between additions has elapsed.
Each entry uses the configured FixedLot. The EA does not increase lot size automatically after losses. Multiple positions nevertheless increase total market exposure.
Trade management
Each position receives an initial stop loss calculated from H1 ATR, subject to the broker’s minimum stop distance. A trailing stop can move the stop into profit after the configured price movement.
The EA includes:
-
A configurable maximum number of positions.
-
A spread filter for new entries.
-
A floating basket-loss threshold based on account balance.
-
An account-equity threshold relative to the balance recorded when the EA starts.
When the maximum position count is reached, the EA attempts to close the basket immediately if BasketProfitTargetUSD is zero or negative. If that value is positive, it waits for basket floating profit to reach the target. This target is checked at the maximum position count, rather than throughout every stage of the basket.
Setup
Use a hedging account for separate positions. Attach the EA to the intended symbol chart; it trades the chart symbol and is not restricted to XAUUSD by code.
Enable Algo Trading and evaluate the settings in Strategy Tester and on a demo account before live use. Broker symbol specifications, trading costs and execution conditions affect operation.
Main inputs
Identification and volume:
-
MagicNumber: identifies the EA’s positions.
-
FixedLot: volume requested for each entry.
-
MaxPositions: maximum position count.
Additional entries:
-
AddWhenLastProfitUSD: latest-position profit required before adding.
-
MinSecondsBetweenAdds: minimum interval between entries.
-
RestartImmediately: allows a new initial entry without waiting for another H1 bar after a basket ends.
Signals:
-
H4FastEMA / H4SlowEMA: H4 trend periods.
-
M15FastEMA / M15SlowEMA: M15 confirmation periods.
-
RSIPeriod: RSI period.
-
BuyRSIMin / SellRSIMax: directional RSI thresholds.
Stops:
-
ATRPeriod: H1 ATR period.
-
InitialStopATR: initial stop-distance multiplier.
-
TrailStartATR: movement required to activate trailing.
-
TrailDistanceATR: trailing-distance multiplier.
Protection and execution:
-
BasketProfitTargetUSD: basket target applied at the maximum position count.
-
MaxBasketLossPercent: basket floating-loss threshold.
-
HardEquityFloorPercent: equity threshold relative to starting balance.
-
MaxSpreadPoints: maximum spread for entries.
-
MaxDeviationPoints: permitted execution deviation.
Despite the USD suffix in input names, profit amounts use the account currency. Basket calculations include floating profit and swap, but do not separately include commissions.
Risk information
Pyramiding can cause substantial losses during reversals, gaps or abnormal execution. Stop losses and software-managed basket closure cannot guarantee a maximum realized loss.
No independently validated profitability results are provided for this build. Historical performance does not guarantee future results.

