
Fusion Scalper AI — User Guide
1) What it is
A lightweight scalping EA combining:
• AI module (online perceptron) that learns from recent bars
• Trend filter with Moving Average
• Timing with Stochastic cross
• Volatility gate using Bollinger Bands Width
• Safety layers: spread filter, bar-cooldown, SL/TP, and trailing stop
It trades one position at a time per symbol/magic.
2) How signals work (high level)
• AI score (from last closed bar) evaluates short-term direction using 5 features:
o bias (1.0), short return, MA slope, Stoch (K–D), BB width (relative to price).
• Filters (optional but on by default):
o MA filter: only buy above MA / sell below MA.
o Stochastic cross: K>D for buys (with a fresh cross), K<D for sells.
o BB width: must exceed a minimum relative width; optionally the width must be
expanding.
• Risk/Execution: If spread ≤ max and cooldown passed, open order with fixed lot or %
risk, set SL/TP, then manage trade with trailing stop.
3) Parameter reference (all inputs)
Trading permissions & safety
• InpAllowLong / InpAllowShort – enable buy/sell directions.
• InpMaxSpreadPoints – maximum spread (in points, not pips) to allow trading.
o Tip: On 5-digit brokers, 10 points ≈ 1 pip.
• InpCooldownBars – minimum bars to wait after an entry before opening a new trade.
Position sizing & exits• InpUseRiskPercent – if true, lot size is computed from InpRiskPercent and SL
distance.
• InpRiskPercent – % of equity risked per trade (used only if above = true).
• InpFixedLot – fixed lot if percentage risk is off.
• InpSL_Points / InpTP_Points – stop loss / take profit distances in points.
Trailing Stop (optional)
• InpUseTrailing – on/off.
• InpTrailStartPoints – start trailing once floating profit ≥ this value (points).
• InpTrailStepPoints – modify SL only when the new SL improves by at least this step
(prevents spam).
• InpTrailDistancePoints – keep SL this many points behind price while trailing.
Moving Average
• InpMAPeriod / InpMAMethod / InpMAPrice – baseline trend filter.
o Default: EMA(50) on Close.
Stochastic
• InpStochK / InpStochD / InpStochSlow / InpStochMethod / InpStochPrice
o Default: 14 / 3 / 3, SMA, Low/High.
o Entry requires fresh cross in the trade direction when enabled.
Bollinger Bands (Width gate)
• InpBBPeriod / InpBBDeviations / InpBBPrice
o Width = Upper – Lower.
• InpUseBBWFilter – require minimum width.
• InpMinBBW_Relative – minimum relative width = (Upper−Lower)/Close, e.g. 0.003 ≈
0.30%.
• InpRequireWidthExpand – if true, width[1] must be > width[2] (expanding volatility).
AI (online perceptron)
• InpUseAI – include AI score in decision.
• InpAI_Threshold – score gate: > +threshold for buys, < −threshold for sells.• InpAI_Learning – update weights on each new bar (uses only closed bars).
• InpAI_LearnRate – weight update step (0.01–0.1 typical).
• InpAI_MaxAbsWeight – caps absolute weight values to prevent runaway learning.
Resetting the AI: The EA initializes weights to zero on attach or re-attach. To “forget”
learning, remove the EA and attach again (or change timeframe/symbol then revert).
4) Exact entry & exit logic
Entry (evaluated on the last closed bar)
A trade can open only if:
1. Spread ≤ InpMaxSpreadPoints and cooldown passed and no position with the same
magic.
2. Filters:
o MA filter (if on):
▪ Buy if Close[1] > MA[1]; Sell if Close[1] < MA[1].
o Stochastic cross (if on):
▪ Buy if K[1] > D[1] and previously (bar 2) K ≤ D.
▪ Sell if K[1] < D[1] and previously (bar 2) K ≥ D.
o BB width filter (if on):
▪ (Upper−Lower)/Close[1] ≥ InpMinBBW_Relative;
▪ and if InpRequireWidthExpand = true → Width[1] > Width[2].
3. AI gate (if on):
o Buy if AI score(shift=1) > +InpAI_Threshold.
o Sell if AI score(shift=1) < −InpAI_Threshold.
Exits
• Hard SL/TP on order open.
• Trailing stop (if on) manages SL as profit grows.
5) Recommended presets (ready to use)Below are tuned baselines. Always forward-test and adjust to your broker’s point size, typical
spread, and commission.
A) EURUSD M5 — “Balanced”
• Risk/Trade mgmt:
o InpUseRiskPercent=false, InpFixedLot=0.10 (or 0.02–0.05 for small accounts)
o InpSL_Points=250, InpTP_Points=300
o InpUseTrailing=true, InpTrailStartPoints=200, InpTrailStepPoints=50,
InpTrailDistancePoints=150
• Filters:
o InpMaxSpreadPoints=20–25
o InpCooldownBars=5
o InpUseMAFilter=true (EMA50)
o InpUseStochCross=true (14/3/3)
o InpUseBBWFilter=true, InpMinBBW_Relative=0.0030,
InpRequireWidthExpand=false
• AI:
o InpUseAI=true, InpAI_Threshold=0.00
o InpAI_Learning=true, InpAI_LearnRate=0.05, InpAI_MaxAbsWeight=5.0
• Notes: Good day-to-day baseline; if entries feel sparse, lower InpMinBBW_Relative to
0.0025.
B) EURUSD M5 — “Conservative”
• Lower risk & tighter filter = fewer but cleaner trades.
• InpFixedLot=0.05 (or InpUseRiskPercent=true, InpRiskPercent=0.5–0.8)
• InpSL_Points=300, InpTP_Points=300
• InpCooldownBars=7–8
• InpMinBBW_Relative=0.0035 and InpRequireWidthExpand=true
• InpAI_Threshold=0.10 (require stronger AI conviction)
• Trailing: Start=250, Step=70, Distance=180C) EURUSD M5 — “Aggressive”
• More trades; higher noise risk.
• InpFixedLot=0.10–0.20 (or InpRiskPercent=1.0–1.5 with % risk mode)
• InpSL_Points=200, InpTP_Points=250
• InpCooldownBars=3
• InpMinBBW_Relative=0.0020, InpRequireWidthExpand=false
• InpAI_Threshold=−0.05 ... +0.05 (essentially near zero gate)
• Trailing: Start=150, Step=40, Distance=120
D) XAUUSD (Gold) M5 — “Volatility aware”
• Gold has larger ranges and spreads—scale distances up.
• InpMaxSpreadPoints: set near your broker’s typical spread (e.g., 300–600 points on 2-
digit/3-digit gold symbols; check symbol specs)
• InpSL_Points=1500–2200, InpTP_Points=1800–2500
• Trailing: Start=1200, Step=300, Distance=900
• InpMinBBW_Relative=0.0040–0.0060
• InpCooldownBars=6
• EMA50, Stoch 14/3/3, AI default learning.
Important: Point sizes differ by symbol. Always open Specifications in MT5 (right-click the
symbol) to confirm digits and contract size.
6) Tuning workflow (fast)
1. Check spread: set InpMaxSpreadPoints just above your average spread on target
sessions.
2. Entry rate: If too few trades → lower InpMinBBW_Relative, or turn off
InpRequireWidthExpand, or reduce InpCooldownBars.
Too many trades → increase Threshold, increase MinBBW_Relative, increase Cooldown.
3. Profitability curve: If many small wins and occasional big losses → increase SL_Points
or start trailing earlier with slightly larger TrailDistance.
4. AI behavior:o If learning is unstable: reduce InpAI_LearnRate to 0.02–0.03; keep
MaxAbsWeight=3–5.
o To “re-seed” learning: re-attach EA (weights reset to zero).
5. Stochastic sensitivity: If you get whipsawed, consider StochK=21 (slower) or require
MA filter strictly on.
7) Backtesting & forward testing
• Model: Every tick or 1-min OHLC for speed; keep timeframe consistent with your plan
(e.g., M5).
• Spread: Use current or a realistic fixed spread for the symbol.
• Commission: Set as per broker.
• Sample periods: Capture both ranging and trending regimes (at least 3–6 months).
• Walk-forward: After optimizing, validate on unseen data.
8) Best practices
• Trade during liquid sessions (London/NY overlap) for tight spreads.
• Avoid major high-impact news if your broker widens spreads—use the spread filter as a
guard.
• One EA instance per symbol (unique Magic if you run multiple EAs).
• If your broker uses very small point values, scale SL/TP/Trailing proportionally.
9) Copy-paste presets (for convenience)
EURUSD M5 — Balanced (paste these values)
• MaxSpreadPoints: 25
• CooldownBars: 5
• UseRiskPercent: false
• FixedLot: 0.10
• SL/TP: 250 / 300• UseTrailing: true
o TrailStart/Step/Distance: 200 / 50 / 150
• MA: EMA 50, PRICE_CLOSE
• Stochastic: 14 / 3 / 3, SMA, Low/High
• BB: 20, 2.0, PRICE_CLOSE
o UseBBWFilter: true, MinBBW_Relative: 0.0030, RequireWidthExpand: false
• AI: UseAI true, Threshold 0.00, Learning true, LearnRate 0.05, MaxAbsWeight 5.0
EURUSD M5 — Conservative
• MaxSpreadPoints 20, Cooldown 7
• FixedLot 0.05 (or %Risk 0.5–0.8)
• SL/TP 300 / 300
• Trailing on: 250 / 70 / 180
• MinBBW_Relative 0.0035, RequireWidthExpand true
• AI Threshold 0.10, LearnRate 0.03
EURUSD M5 — Aggressive
• MaxSpreadPoints 30, Cooldown 3
• FixedLot 0.10–0.20 (or %Risk 1.0–1.5)
• SL/TP 200 / 250
• Trailing on: 150 / 40 / 120
• MinBBW_Relative 0.0020, RequireWidthExpand false
• AI Threshold 0.00 ±0.05