Extracted algorithm research record
Gold Pullback Martingale
Automated trading robot for XAUUSD using a martingale strategy after a pullback.
Source & extraction context
Evidence label: backtest_shown (source claim, not independent verification). Recorded completeness: 80.0/100. Neither is a performance result.
Names identify source records. Inclusion is not an endorsement or a claim of authorship, ownership or reuse permission. Check the source license before reusing any implementation.
Extraction warnings
Claim warnings
- RECOVERY SIZING: position size increases after losses (martingale/grid/averaging). Equity curves look smooth until the run that does not recover - judge it on worst-case exposure, not win rate.
Recorded market & execution profile
- Recorded markets
- XAUUSD
- Recorded timeframes
- H1
- Recorded sessions
- 02:00–22:00 server time, No new baskets on Friday
- Recorded regime
- trending
Recorded indicators & parameters
| Indicator | Parameters | Applied to |
|---|---|---|
| EMA | {"period": 20} | close |
| EMA | {"period": 100} | close |
Extracted strategy rules
Recorded long-entry rules
- Trend: the slow EMA (100) must have risen by at least 0.30 × ATR over the last 10 bars, and the close must be on the trend side of the slow EMA.
- Pullback: the bar touched the fast EMA (20) and closed back beyond it in the trend direction. The candle must also be bullish.
Recorded short-entry rules
- Trend: the slow EMA (100) must have fallen by at least 0.30 × ATR over the last 10 bars, and the close must be on the trend side of the slow EMA.
- Pullback: the bar touched the fast EMA (20) and closed back beyond it in the trend direction. The candle must also be bearish.
Recorded exit rules
- Basket take-profit: the basket closes when price is BasketTpAtr × ATR beyond the volume-weighted average price and the basket is in profit.
Recorded filters
- Spread (as a fraction of ATR and/or in points)
- Trading hours (server time): 02:00–22:00, no new baskets on Friday
- Minimum ATR
- Direction: buy, sell, or both
- Only one basket per symbol and magic number is open at a time
- Stop loss
- Basket SL % of balance at basket start: 10%
- Take profit
- Basket TP × ATR: 0.60
- Position sizing
- Starting lot: a fixed lot, or a lot per 1,000 of balance. Additional levels: a level is added when price moves against the worst entry by StepAtr × ATR × StepGrowth^(n-1). Lot size: each level's lot = starting lot × multiplier^n (default 1.50, allowed 1.0–3.0).
Questions about this record
What entry rules are recorded for Gold Pullback Martingale?
Long: Trend: the slow EMA (100) must have risen by at least 0.30 × ATR over the last 10 bars, and the close must be on the trend side of the slow EMA. Pullback: the bar touched the fast EMA (20) and closed back beyond it in the trend direction. The candle must also be bullish. Short: Trend: the slow EMA (100) must have fallen by at least 0.30 × ATR over the last 10 bars, and the close must be on the trend side of the slow EMA. Pullback: the bar touched the fast EMA (20) and closed back beyond it in the trend direction. The candle must also be bearish. These are unverified extracted rules.
Which markets and timeframes are recorded?
Markets: XAUUSD. Timeframes: H1. These are source-recorded labels, not verified execution behavior.