Auto Fib + EMA200 MTF [SamoAlgo] - FIXED — Strategy by samo0o0
By samo0o0
Performance Metrics
- Author: samo0o0
- Symbol: TVC:GOLD
- Timeframe: 1 minute
- Win Rate: 66.7%
- Profit Factor: 2.543
Description
# Auto Fib + EMA200 MTF [SamoAlgo]**A multi-timeframe trend-confirmation strategy combining automatic Fibonacci retracement detection with EMA200 alignment across four timeframes.**## OverviewThis strategy automatically detects swing structures (pivot highs/lows) and looks for high-probability retracement entries at a configurable Fibonacci level (default 61.8%), but only when the broader trend is confirmed across multiple timeframes simultaneously.Unlike simple Fib tools that fire on every retracement, this script requires trend agreement across 1m, 5m, 15m, and 60m EMA200 readings before considering an entry valid — reducing false signals during choppy, directionless conditions.## How it works**1. Swing & Fibonacci detection**The script identifies confirmed pivot highs and lows (adjustable strength), measures the swing size against current ATR to filter out insignificant moves, and calculates an entry zone at your chosen Fibonacci retracement level. Setups expire automatically after a configurable number of bars if price never reaches the entry zone.**2. Multi-timeframe trend filter**Before any entry, the script checks EMA200 position across four timeframes (1m/5m/15m/60m). You control how many of the four must agree (1–4) — requiring all four is strictest; lowering the threshold allows more signals during transitional market conditions.**3. Risk management**- Position sizing is equity-based (% risk per trade)- Stop and target can be ATR-based or Fibonacci-extension based (your choice)- Optional minimum Risk:Reward filter — trades below your threshold are skipped- Optional ADX-based trend-strength filter to avoid ranging markets- Optional max-trades-per-day cap- Optional cooldown period between trades to avoid clustering on the same swing**4. Visual feedback**Confirmed trades (not just signals — actual filled positions) draw persistent entry/stop/target lines and a labeled marker directly on the chart, so every alert you receive corresponds to a real, verified trade in the strategy's backtest.## Inputs (fully customizable)- Pivot strength, Fib entry level, Fib target extension, minimum swing size- ATR-based or Fib-based stop/target- Risk % per trade- EMA200 length and timeframe-agreement threshold- Volatility filter, session filter, ADX filter, R:R filter, daily trade cap, cooldown- Independent long/short enable toggles## Important notes- This is a **strategy** script (uses `strategy()`), meaning results shown are backtested performance, not a guarantee of future results. Always forward-test on a demo account before risking real capital.- The multi-timeframe EMA filter is inherently asymmetric to current market regime: in a sustained downtrend it will naturally favor short setups (and vice versa in an uptrend). This is expected behavior of trend-following logic, not a bug — adjust the timeframe-agreement threshold if you want more balanced signal frequency across both directions.- `request.security()` calls use `barmerge.lookahead_off` — no repainting from future data.- Past performance, including any results shown on the published chart, does not guarantee future performance. Trade at your own risk and use proper position sizing.— SamoAlgo