StackTrend GoldSilver

**StackTrend GoldSilver** is a two-engine trend portfolio for MetaTrader 5: it trades gold (XAUUSD) and silver (XAGUSD) on H1 through two independent engines under strict, percentage-based risk control.

Each engine has its own magic number, its own order comment and its own risk budget. The engines do not mix positions, and each of them can also work alone. The EA uses no DLLs, no custom indicators and no external files, and it works on hedging and netting accounts in any account currency.

## Key features

- **Two engines on one chart** — gold and silver are traded by independent engines with separate risk budgets, so one market going flat does not stop the other
- **Risk-first sizing** — the position size is always computed from the actual stop-loss distance as a fixed percentage of equity, never as a fixed lot
- **Multi-level account protection** — portfolio risk cap, peak-equity drawdown governor, daily and monthly loss limits, consecutive-loss pause
- **No dangerous money management** — no martingale, no grid, no averaging down, no lot multiplication after losses; every position always has a stop loss
- **Works from small balances** — a documented small-account preset trades the minimum lot under a hard risk cap
- **Transparent risk decisions** — entries blocked by risk limits are logged with the reason: lot feasibility, portfolio cap, drawdown governor or loss pause

## Who it is for

- Traders who want systematic trend exposure to precious metals without manual chart management
- Accounts from ~800 USD (small-account preset) or from ~5000 USD (standard preset), including cent accounts
- Users who prefer risk decisions to be explicit and auditable in the journal instead of hidden inside the logic

## Risk management

- Position sizing by a fixed percentage of equity; the volume is calculated from the actual stop-loss distance of the specific trade
- Portfolio risk cap: a new entry is blocked when the total open risk of the engine exceeds the limit
- Peak equity drawdown governor: after a configurable drawdown from the equity peak, risk per trade is scaled down automatically; the peak is tracked from the equity at EA start and re-baselines at every launch
- Daily and monthly loss limits (off by default, enabled in the inputs)
- Consecutive-loss pause: after a series of stop-outs the engine pauses and re-arms only on a fresh signal sequence
- Minimum-lot feasibility control with a configurable cap: on small accounts, where the minimum lot itself risks more than the target percentage, the engine either allows the minimum lot (while its actual risk stays under the cap) or waits
- Margin check before every order, spread filter relative to ATR, slippage control

## How it trades

**Engine A — XAUUSD (gold)**

- Trend stack: EMA(8) and EMA(80) position relative to the long-term SMA(350) regime filter
- Entry on pullback: after the stack aligns, the engine waits for a pullback into the fast zone and a rejection bar
- Higher-timeframe bias filter (H12)
- ATR volatility filter: entries are skipped when current volatility is far below its average
- After an initial stop-out the engine can re-enter in the opposite direction with a reduced volume, subject to a fresh signal confirmation

**Engine B — XAGUSD (silver)**

The same trend concept with parameters adapted to silver: EMA(16)/EMA(100) stack relative to SMA(350), an ADX trend-strength filter and wider ATR-based stops that reflect the higher noise of the silver market.

## Exits

- Initial stop loss: 1.5 x ATR(16) for gold and 2.25 x ATR(16) for silver; the stop distance includes an automatic spread buffer
- Break-even move at 1.75 x ATR
- ATR trailing stop: 3 x ATR for gold, 4 x ATR for silver

## What the EA does not do

- No martingale, no grid, no averaging down, no lot multiplication after losses
- One position per engine at a time (no pyramiding)
- Every position always has a stop loss
- The journal stays clean: only operational events and risk-management decisions are logged, no strategy internals

## Requirements

- MetaTrader 5, hedging or netting account
- XAUUSD and XAGUSD symbols; exact names are set in the inputs (for example XAUUSD.m or GOLD — adjust to your broker's naming)
- Leverage from 1:100; any account currency
- A VPS or an always-on terminal is recommended
- The chart timeframe does not matter: the engines use their own H1 and H12 data

## Presets

Only input values change between the profiles — no code edits are needed.

**Standard (default inputs)** — balances from 5000 USD and higher:

- Risk per trade 1.25%, portfolio risk cap 4%, peak drawdown limit 25%, min lot risk cap 3%

**Small account** — balances 800–2000 USD (set manually):

- Risk per trade 6%, portfolio risk cap 6%, peak drawdown limit 20%, daily loss limit 8%, monthly loss limit 15%, min lot risk cap 6%
- The engines trade the minimum lot 0.01 while its actual risk stays within the cap and stand aside when volatility is too high for a small balance

Note: on very small balances the silver engine trades less often than the gold one — the minimum silver lot carries more risk at equal settings, so the cap holds it back until volatility drops.

**Conservative** — balances from 10000 USD (set manually):

- Risk per trade 0.75%, portfolio risk cap 3%, peak drawdown limit 15%, daily loss limit 5%, monthly loss limit 10%

## How to test

1. Open the Strategy Tester, select StackTrend GoldSilver and XAUUSD as the symbol, H1
2. Modeling: "Every tick based on real ticks"
3. Deposit: 10000 USD for the standard preset or 800 USD for the small-account preset
4. The first run downloads history for both symbols and may take longer than a single-symbol test
5. Check the Journal tab: the EA logs the sizing check and its risk-limit decisions (lot feasibility, portfolio cap, drawdown governor, loss pause)

## Main inputs (per engine)

- Symbol name — trading symbol, adjust to your broker's naming
- Risk per trade, % of equity
- Magic number
- Order comment
- Max slippage, points
- Max spread as ATR ratio
- Min lot risk cap, % — maximum actual risk allowed for the minimum lot (raise it on small accounts)
- Portfolio risk cap, %
- Peak equity drawdown limit, %
- Risk scale factor in drawdown
- Remember equity peak across restarts — false (default): the peak re-baselines at every EA launch; true: the peak is stored in terminal global variables and survives restarts
- Daily loss limit, % (0 = off)
- Monthly loss limit, % (0 = off)

## FAQ

**The EA does not open trades. Why?**
Several governors can hold entries at the same time: the minimum-lot risk cap on small balances (see the small-account preset), the volatility filter, the higher-timeframe bias filter, the drawdown governor, the loss pause or the spread filter. The Experts journal shows when an entry is blocked by a risk limit (lot feasibility, portfolio cap, drawdown governor or loss pause); signal-level filters are evaluated silently.

**How do I trade only one metal?**
Set the other engine's "Symbol name" input to a non-existent name (for example, OFF). That engine disables itself at start and writes a message to the journal.

**My broker uses different symbol names.**
Set the exact names in the "Symbol name" inputs of both engines.

**Does it work on cent accounts?**
Yes. Risk is set as a percentage of equity, so the logic is the same; on cent accounts a small deposit gets finer lot granularity, which suits the small-account profile.

**Why can live results differ from the backtest?**
Spreads, slippage, swaps and execution details differ between brokers and accounts. Test with real ticks and start on a demo account.

**How often does it trade?**
It is a trend system: trade frequency depends on the market regime and varies from month to month. Do not expect daily activity.

## Version history

- 1.00 — initial release

## Note

Trading leveraged instruments involves risk of loss. Backtest results do not guarantee future performance. Test the EA in the Strategy Tester and on a demo account before using real funds.

Filtro:
Nessuna recensione
Rispondi alla recensione