From XAUUSD to BTCUSD: A Complete Migration Guide for TrendCandleEA

From XAUUSD to BTCUSD: A Complete Migration Guide for TrendCandleEA

11 September 2026, 23:05
Zakaria-tarik Mehadji
0
47
From XAUUSD to BTCUSD: A Complete Migration Guide for TrendCandleEA

How to transform the XAU configuration of TrendCandleEA into the BTC configuration — parameter by parameter, with the reasoning behind every change.


    1. Introduction

    TrendCandleEA ships with several ready-to-use configurations, one per market. The XAU configuration is calibrated for gold (XAUUSD) on the M30 timeframe. The BTC configuration is calibrated for Bitcoin (BTCUSD) on the same M30 timeframe.

    Both share the exact same engine — the same signal logic, the same filter framework, the same position management. Only the input values differ.

    This article is a step-by-step migration guide. It explains:

    • Why the XAU configuration, applied to Bitcoin without modification, produces poor or erratic results.
    • Which inputs must change, and by how much.
    • Which inputs must be left untouched, and why.
    • How to verify your setup before running it live.

    By the end of this guide, you will be able to take the XAU configuration, apply every documented change, and end up with a fully working BTC configuration — with no guesswork.

    2. Why the XAU Configuration Cannot Be Used As-Is on Bitcoin

    At first glance, XAUUSD and BTCUSD look similar on a chart: both are quoted in US dollars, both trend strongly for weeks, and both respond to macro news. But under the hood, they are fundamentally different instruments. A configuration tuned for one will behave very differently on the other.

    Concretely, if you take the XAU configuration and run it on BTCUSD without any change, three problems appear immediately:

    1. The spread and slippage filters block almost every trade. The XAU configuration caps the spread at 60 points. On BTCUSD, normal spread is 10 to 30 times higher — so the EA simply never trades.
    2. The Stop Loss is too tight. The XAU configuration adds a 1 000-point buffer to the SL. On Bitcoin, that buffer is roughly 10 USD — a meaningless distance given BTC's typical M30 range. Trades get stopped out by pure noise.
    3. The signal filters were tuned for gold's rhythm. Gold trends smoothly with few pullbacks. Bitcoin trends violently, with frequent liquidation cascades and fakeouts. Filters that work on gold leave Bitcoin either over-exposed or fully blocked.

    The BTC configuration solves all three problems by rebuilding the filter stack from scratch for Bitcoin's specific behaviour.

    3. The Three Fundamental Differences Between XAUUSD and BTCUSD

    3.1 Price Level

    At the time of the backtest, XAUUSD traded around 4 500–5 500 USD per ounce. BTCUSD traded between 62 000 and 93 000 USD per coin. The absolute price level is roughly 15× higher on Bitcoin.

    3.2 Volatility

    A typical daily range on XAUUSD is about 1 % of price. A typical daily range on BTCUSD is 3 to 5 %. In absolute terms, Bitcoin moves 30 to 60 times more than gold on a normal day. This is why every point-based parameter must be scaled accordingly.

    3.3 Market Structure

    Gold trades 23 hours a day, 5 days a week, with a well-defined session pattern (Asian range, London breakout, New York continuation). Bitcoin trades 24/7, with no session boundaries, and is subject to exchange-specific events (weekend liquidation cascades, funding rate flips, whale movements). The result: gold trends are smooth; Bitcoin trends are punctuated by violent reversals.

    4. The Point Paradox — The Single Most Important Concept

    Before changing any parameter, you must understand one thing: on BTCUSD, one point is not worth the same as one point on XAUUSD.

    Both symbols typically use 2 decimal places, so _Point = 0,01 in both cases. But the value of one point in USD depends on the contract size, which is defined by the broker, not by the price.

    For a common broker setup:

    • XAUUSD: 1 lot = 100 ounces → 0,01 lot = 1 ounce → 1 point (0,01 USD) = 0,01 USD of P&L per 0,01 lot.
    • BTCUSD: 1 lot = 1 BTC → 0,01 lot = 0,01 BTC → 1 point (0,01 USD) = 0,0001 USD of P&L per 0,01 lot.

    In other words, one point on BTC is worth 100 times less than one point on gold, at equal volume. So to risk the same dollar amount, the Stop Loss on BTC must be 100 times wider in points than the equivalent SL on gold.

    Golden rule of this migration: every input expressed in points must be recalculated for BTC, taking into account both the price level (≈ 15×) and the contract value (≈ 100× ratio). The combined factor is not a simple multiplication — each parameter has its own rationale, explained below.

    5. Migration, Group by Group

    The following sections walk through every group of inputs in the same order they appear in the EA's input window. For each parameter, the change is given alongside its justification.

    5.1 General Group

    Input XAU value BTC value Reason
    InpMagic 1003 1004 Unique identifier per configuration. Prevents interference if both instances run on the same account.
    InpTradeComment XauTrendCandle BtcTrendCandle Instant visual identification from the MT5 mobile app.
    InpSlippagePoints 30 3 000 BTC spreads are ~15× wider than gold. 30 points = 0,30 USD is instantly slipped on BTC.
    InpMaxSpreadPoints 60 6 000 BTC normal spread ranges from 10 to 30 USD (1 000–3 000 points). 60 points would block every trade.
    InpTimeframe PERIOD_CURRENT PERIOD_CURRENT Unchanged. Both configurations are calibrated for M30.
    InpMaxPositions 0 0 Unchanged (unlimited).
    InpAllowHedge true true Unchanged.
    InpCloseOppositeFirst false false Unchanged.

    5.2 Matrend Group

    Input XAU value BTC value Reason
    InpUseMaTrend false true Bitcoin's trend is more directional and benefits from a local trend filter.
    InpMaTimeframe PERIOD_CURRENT PERIOD_CURRENT Unchanged (M30).
    InpMaPeriod 50 50 Unchanged. EMA 50 on M30 is the local trend reference.
    InpMaMethod MODE_EMA MODE_EMA Unchanged.
    InpMaPrice PRICE_CLOSE PRICE_CLOSE Unchanged.
    InpMaShift 0 0 Unchanged.
    InpRequireBodyAboveMa false true On Bitcoin, wicks frequently pierce the EMA without real body commitment. Requiring the entire body to be above/below the EMA filters out these false signals.

    5.3 Higher Timeframe MA Group

    Input XAU value BTC value Reason
    InpUseHtfMaFilter false true Bitcoin's macro trend alignment is essential to avoid trading against the dominant direction.
    InpHtfMaTimeframe H1 H4 H4 is a more reliable macro filter on Bitcoin than H1, which is too noisy.
    InpHtfMaPeriod 50 200 H4 EMA 200 is the industry standard for BTC macro bias.
    InpHtfMaMethod MODE_EMA MODE_EMA Unchanged.
    InpHtfMaPrice PRICE_CLOSE PRICE_CLOSE Unchanged.
    InpHtfMaShift 0 0 Unchanged.

    5.4 ADX Group

    Input XAU value BTC value Reason
    InpUseAdxFilter true false On Bitcoin, the combination of HTF MA, Matrend, Squeeze Momentum and dual ZigZag already handles trend confirmation. ADX would over-constrain the stack and block nearly all signals.

    The other ADX parameters ( InpAdxTimeframe , InpAdxPeriod , InpAdxMin ) are left at their defaults. Since the filter is disabled, they have no effect.

    5.5 Candle Quality Group

    Input XAU value BTC value Reason
    InpUseBodyQualityFilter false true Bitcoin produces many weak candles with large wicks. Requiring a solid body is critical.
    InpMinBodyRatio 0,50 0,50 Unchanged. 50 % body / range is a universal minimum.
    InpMinBodyAtrMult 0,60 0,60 Unchanged. Relative measure, valid on any market.
    InpAtrPeriod 14 2 On Bitcoin, ATR(2) captures recent volatility so the "body ≥ 0,60 × ATR" rule adapts to rapid regime changes. ATR(14) is too slow and would miss the recent volatility spike that precedes most continuations.
    InpRequireCloseNearExtreme true true Unchanged.
    InpCloseNearExtremeRatio 0,33 0,33 Unchanged.

    5.6 Session Filter Group

    Unchanged. The session filter remains disabled ( InpUseSessionFilter = false ). Bitcoin trades 24/7; a session filter would only reduce opportunities without improving quality.

    5.7 RSI Group

    Input XAU value BTC value Reason
    InpUseRsiFilter true false On Bitcoin, the RSI frequently remains above 65 for weeks during a bull trend. Keeping the filter would block almost every BUY signal in a strong trend.

    The other RSI parameters ( InpRsiTimeframe , InpRsiPeriod , etc.) are left at defaults. Since the filter is disabled, they have no effect.

    5.8 MACD Group

    Input XAU value BTC value Reason
    InpUseMacdFilter true false MACD momentum on Bitcoin is too correlated with the Matrend and Squeeze filters. Its removal simplifies the stack without reducing signal quality.

    Other MACD parameters are left at defaults, as the filter is disabled.

    5.9 Squeeze Momentum Group

    Input XAU value BTC value Reason
    InpUseSqzFilter false true The Squeeze Momentum filter is Bitcoin's equivalent of a volatility gate. It identifies when volatility compresses and then releases — a classic Bitcoin breakout signature.
    InpSqzBBLength 20 20 Unchanged.
    InpSqzBBMult 2,0 2,0 Unchanged.
    InpSqzKCLength 20 20 Unchanged.
    InpSqzKCMult 1,5 1,5 Unchanged.
    InpSqzUseTrueRange true true Unchanged.
    InpSqzMomLength 20 20 Unchanged.
    InpSqzMode MOMENTUM_DIRECTION RELEASE_RECENT On Bitcoin, the "squeeze pop" pattern (compression followed by release) is a much stronger signal than a simple momentum reading. The EA requires the signal candle to be outside a squeeze, with a squeeze having occurred within the previous 3 candles.
    InpSqzReleaseLookback 3 3 Unchanged (3 candles lookback for the squeeze release).
    InpSqzRequireAcceleration true false The acceleration requirement further reduces trades on Bitcoin without improving quality. Disabled.

    5.10 Bollinger Bands — 5 Timeframes Group

    Input XAU value BTC value Reason
    InpBbUseTf1 true true TF1 remains active.
    InpBbTimeframe1 H3 H4 H4 is a more natural macro reference on Bitcoin than H3 (which is arbitrary and less liquid).
    InpBbModalityTf1 A (median) A (median) Unchanged.
    InpBbUseTf2 true false Modality B (outer band touch) is disabled on BTC. Bitcoin regularly overshoots its bands during liquidation cascades — the touch is not a reliable signal.
    TF3, TF4, TF5 false false Unchanged.

    5.11 Bollinger Modality A — Median Line Group

    Input XAU value BTC value Reason
    InpUseBollingerMiddleFilter true true Unchanged.
    InpBbPeriodA 200 200 Unchanged.
    InpBbDeviationA 2,0 2,0 Unchanged.
    InpBbFilterMode MIDDLE_CONFIRMATION MIDDLE_CONFIRMATION Unchanged.
    InpBbRequireMiddleSlope true false Bitcoin's H4 median line frequently flattens during consolidation phases that precede explosive breakouts. Requiring a slope would filter out the best entries. Disabled.
    InpBbRejectOuterBandEntries false true On Bitcoin, entering too close to the outer band is dangerous. Entries near the extreme of an extended move are rejected.
    InpBbOuterBandBufferPoints 0 0 Unchanged (no additional buffer).
    InpBbMinWidthPoints 0 0 Unchanged (no minimum width constraint).

    5.12 Bollinger Modality B — Outer Band Touch Group

    Input XAU value BTC value Reason
    InpUseBollingerOuterTouchFilter true false Disabled on BTC. See section 5.10.

    Other Modality B parameters are left at defaults, as the filter is disabled.

    5.13 Smart Money Concept (SMC) Group

    Input XAU value BTC value Reason
    InpUseSmcFilter false true The SMC filter, and specifically the Fair Value Gap component, is highly effective on Bitcoin. BTC frequently retests imbalances left by impulsive moves — a well-documented institutional behaviour.
    InpSmcTimeframe M5 PERIOD_CURRENT Aligned to the signal timeframe (M30).
    InpSmcLookbackBars 300 300 Unchanged.
    InpSmcSwingStrength 2 2 Unchanged.
    InpSmcRequireStructureBreak false false Unchanged (disabled).
    InpSmcRequireLiquiditySweep false false Unchanged (disabled).
    InpSmcRequireDisplacement false false Unchanged (disabled).
    InpSmcRequireFvg true true Unchanged (FVG is the only active SMC sub-filter).
    InpSmcFvgLookback 6 6 Unchanged.

    5.14 ZigZag Filter #1 Group

    Input XAU value BTC value Reason
    InpUseZigZagFilter true true Unchanged.
    InpZigZagDepth 24 12 Bitcoin produces faster swings than gold. A depth of 12 detects pivots sooner, keeping the leg direction current. A depth of 24 would lag by several candles and lag the trend identification.
    InpZigZagDeviation 5 5 Unchanged. 5 points = 0,05 USD — negligible on both markets, effectively disabled as a meaningful filter.
    InpZigZagBackstep 3 3 Unchanged.
    InpZigZagScanBars 300 300 Unchanged.

    5.15 ZigZag Filter #2 Group

    Input XAU value BTC value Reason
    InpUseZigZagFilter2 false true A second ZigZag on H4 is enabled on BTC to provide higher timeframe leg confirmation, in line with the HTF MA filter.
    InpZigZag2Timeframe H4 H4 Unchanged.
    InpZigZag2Depth 24 12 Same reasoning as ZigZag #1 — faster pivot detection.
    InpZigZag2Deviation 5 5 Unchanged.
    InpZigZag2Backstep 3 3 Unchanged.
    InpZigZag2ScanBars 300 300 Unchanged.

    5.16 Candle Filter Group

    Input XAU value BTC value Reason
    InpMinBodyPoints 0 0 Unchanged (disabled).
    InpMinSlPoints 0 0 Unchanged.
    InpMaxSlPoints 0 0 Unchanged.
    InpSlBufferPoints 1 000 10 000 The single most important change. On XAU, 1 000 points = 10 USD. On BTC, 1 000 points = 10 USD too — but on BTC, an M30 candle commonly ranges 500 to 1 500 USD. A 10-USD buffer is meaningless and would result in the SL being hit by pure spread. 10 000 points = 100 USD provides a meaningful buffer without excessively widening the SL.
    InpOneTradePerBar true true Unchanged.

    5.17 Volume Filter Group

    Input XAU value BTC value Reason
    InpUseVolumeFilter false true On Bitcoin, volume confirms that the move is backed by real market participation. Illiquid periods produce false signals.
    InpVolumeTimeframe PERIOD_CURRENT M15 M15 volume reacts faster than M30 and provides an earlier confirmation of participation.
    InpVolumeSource VOL_SRC_TICKS VOL_SRC_TICKS Unchanged. Tick volume is available from all brokers and works reliably.
    InpVolumeMinAbsolute 0 0 Unchanged (disabled).
    InpVolumeUseAverage true true Unchanged.
    InpVolumeAvgPeriod 20 20 Unchanged.
    InpVolumeAvgMultiplier 1,20 1,20 Unchanged. Volume must be at least 1,20× the 20-candle average.
    InpVolumeRequireRising true true Unchanged. Volume must also be higher than the previous candle.

    5.18 Volumes Indicator Filter Group

    Unchanged. The iVolumes-based filter remains disabled ( InpUseVolumesIndFilter = false ). It is redundant with the Volume Filter group already enabled in section 5.17.

    5.19 Virgin Price Filter Group

    Input XAU value BTC value Reason
    InpUseVirginCloseFilter true false Bitcoin's price action is highly repetitive over long horizons. Almost every price level has been visited at some point in the last 10 000 M30 candles. Keeping this filter on BTC would block nearly every trade. Disabled.

    Other Virgin Price parameters are left at defaults, as the filter is disabled.

    5.20 Money Management Group

    Unchanged in the backtest. The BTC backtest used InpLotMode = LOT_FIXED with InpFixedLot = 0,01 , exactly as the XAU backtest. Both use the same lot size, which keeps the comparison rigorous.

    Recommended for live trading: switch to LOT_RISK_PCT with InpRiskPercent = 0,5 and InpMaxLot = 1,0 . Bitcoin's volatility means a fixed lot can become disproportionately risky as price rises.

    5.21 Exit Modes Group

    Unchanged. The BTC configuration uses InpMode_TP_EgalSL = true (Mode 2 — Fixed TP = SL distance), exactly as the XAU configuration.

    5.22 Mode Settings Group

    Unchanged. The relevant parameters for Mode 2 are already covered by the SL buffer set in section 5.16. Other mode parameters (MODE 1, MODE 3, MODE 5) remain at their defaults and have no effect since only Mode 2 is active.

    6. Summary Table — Every Changed Input

    The table below consolidates all changes documented above. It can be used as a checklist when configuring the EA manually.

    # Input XAU value BTC value
    1 InpMagic 1003 1004
    2 InpTradeComment XauTrendCandle BtcTrendCandle
    3 InpSlippagePoints 30 3 000
    4 InpMaxSpreadPoints 60 6 000
    5 InpUseMaTrend false true
    6 InpRequireBodyAboveMa false true
    7 InpUseHtfMaFilter false true
    8 InpHtfMaTimeframe H1 H4
    9 InpHtfMaPeriod 50 200
    10 InpUseAdxFilter true false
    11 InpUseBodyQualityFilter false true
    12 InpAtrPeriod 14 2
    13 InpUseRsiFilter true false
    14 InpUseMacdFilter true false
    15 InpUseSqzFilter false true
    16 InpSqzMode MOMENTUM_DIRECTION RELEASE_RECENT
    17 InpSqzRequireAcceleration true false
    18 InpBbTimeframe1 H3 H4
    19 InpBbUseTf2 true false
    20 InpUseBollingerOuterTouchFilter true false
    21 InpBbRequireMiddleSlope true false
    22 InpBbRejectOuterBandEntries false true
    23 InpUseSmcFilter false true
    24 InpSmcTimeframe M5 PERIOD_CURRENT
    25 InpZigZagDepth 24 12
    26 InpUseZigZagFilter2 false true
    27 InpZigZag2Depth 24 12
    28 InpSlBufferPoints 1 000 10 000
    29 InpUseVolumeFilter false true
    30 InpVolumeTimeframe PERIOD_CURRENT M15
    31 InpUseVirginCloseFilter true false

    Thirty-one inputs changed between the XAU and BTC configurations. All other inputs remain identical.

    7. What Stayed the Same

    It is equally important to know what did not change — and to avoid the temptation to modify these parameters "just to be safe". They were validated as-is during the BTC backtest.

    • All indicator periods (EMA 50, EMA 200, BB 200, ATR — where ATR was explicitly changed to 2, all others): these are measured in bars, not in points. Bar counts are market-agnostic.
    • All Bollinger deviations (2,0 for Modality A, 0,5 for Modality B): these are standard deviation multipliers, unit-less.
    • All threshold values (RSI 65/35, Stochastic 80/20, IBS 70/30): these are oscillator levels, independent of price.
    • All ratios ( InpMinBodyRatio = 0,50 , InpMinBodyAtrMult = 0,60 , InpCloseNearExtremeRatio = 0,33 ): relative measurements, valid on any market.
    • Volume multiplier (1,20 × 20-candle average): relative, not absolute.
    • Risk / money management parameters (Mode 2, fixed lot 0,01 for the backtest): identical between the two backtests to keep the comparison rigorous.

    8. Verification Checklist Before Running

    Before running the BTC configuration on live or demo, verify the following points. Each one addresses a common source of error.

    1. Verify your broker's BTCUSD specifications. In MetaTrader 5, right-click BTCUSD in the Market Watch → Specification. Note the Digits (should be 2), Point (should be 0,01), Contract size , and Spread .
    2. Verify that all 31 changed inputs are correctly set. Cross-check against the summary table in section 6.
    3. Verify that InpMagic = 1004 . If you run XAU and BTC configurations on the same account, the two magic numbers must differ.
    4. Verify that InpTradeComment = BtcTrendCandle . Open a demo position and check the position comment in MT5 — it should read BtcTrendCandle , not XauTrendCandle .
    5. Verify that InpSlBufferPoints = 10 000 . A common mistake is to leave it at 1 000 (XAU value), which would produce an SL that is 100 times too tight.
    6. Verify that InpMaxSpreadPoints = 6 000 . With 60, the EA would never trade on BTC.
    7. Verify that InpUseVirginCloseFilter = false . With it enabled, almost no BTC trade would pass.
    8. Verify that InpUseSqzFilter = true with InpSqzMode = RELEASE_RECENT . This is the volatility gate specific to BTC.
    9. Verify that InpUseVolumeFilter = true with InpVolumeTimeframe = M15 . Volume confirmation is specific to the BTC config.
    10. Run 1 week on a demo account before going live, to observe the trade frequency and verify that the configuration matches expectations.

    9. Common Mistakes to Avoid

    Mistake 1 — Copying the XAU .set file onto BTCUSD.
    The result would be: no trades (spread filter blocks), or catastrophic losses (SL too tight). Always migrate parameter by parameter using section 6.
    Mistake 2 — Leaving InpSlBufferPoints at 1 000.
    On BTC, 1 000 points = 10 USD. This is essentially zero relative to Bitcoin's M30 volatility. Every trade would be stopped out by noise. Set to 10 000.
    Mistake 3 — Keeping the RSI and MACD filters enabled.
    On Bitcoin, these filters are too restrictive when combined with the BTC-calibrated stack. They would reduce the trade count from 20 over 9 months to 2 or 3 — making the configuration unusable.
    Mistake 4 — Setting InpMagic to the same value as the XAU configuration.
    If both instances run on the same account, the EA would count positions from both configurations together, produce incorrect daily loss calculations, and interfere in trailing stop management. Always use distinct magic numbers.
    Mistake 5 — Assuming BTCUSD has the same _Point on every broker.
    Some brokers quote BTCUSD with 1 or 3 decimals. If your broker uses 1 decimal, _Point = 0,1 , and every point-based parameter must be divided by 10. Always verify the symbol specification before running.

    10. Results Comparison — XAU vs BTC

    The table below compares the two configurations over the exact same 9-month period, on the same broker, with the same EA build.

    Metric XAU — Config 1.2 (Selective) BTC Configuration
    Symbol XAUUSD BTCUSD
    Timeframe M30 M30
    Period 2026.01 → 2026.09 2026.01 → 2026.09
    Trades 37 20
    Win rate 83,78 % 95,00 %
    Profit Factor 5,60 11,77
    Balance DD max 4,25 % 1,02 %
    Equity DD max 5,06 % 2,05 %
    Net profit +79,7 % +12,0 %
    Sharpe Ratio 31,21 17,59
    Long / Short 37 / 0 7 / 13

    Both configurations deliver positive expectancy with very controlled drawdown. The BTC configuration trades less often, has a higher win rate, a higher Profit Factor and a much lower drawdown — but a lower absolute return over the same period, because it trades roughly half as often. The BTC config is also the only one of the two that traded in both directions during the test window.

    11. Conclusion

    Migrating from the XAU configuration to the BTC configuration is not a matter of scaling a few points-based parameters. It requires a full recalibration of the filter stack, driven by Bitcoin's specific market behaviour: higher volatility, longer trends, more frequent fakeouts, and a fundamentally different microstructure.

    Thirty-one inputs change between the two configurations. Thirty-one others remain untouched. The summary table in section 6 is designed to be used as a direct reference during configuration.

    Traders who already run the XAU configuration successfully can add the BTC configuration alongside it, provided they respect the two golden rules: a distinct InpMagic (1004 instead of 1003) and a distinct InpTradeComment ( BtcTrendCandle instead of XauTrendCandle ).

    Always validate on a demo account before going live, and always use risk-based position sizing.

    Important disclaimer: Backtest results are historical and do not guarantee future performance. Always validate any EA on a demo account for several weeks before deploying it on live capital. Use risk-based position sizing and a maximum daily loss limit. Past performance is not indicative of future results.

    Thank you for reading. Feedback, bug reports and suggestions are welcome in the comments section.

    Useful Links