PROTECTED SOURCE SCRIPT
Zaktualizowano Reversal & Follow The Trend Signal for XAUUSD [aganac3]

A hybrid trend–reversal & trend-continuation system for Gold (XAUUSD, 5-minute) that merges two engines:
1. FTT (Follow-The-Trend / Trend Continuation logic) from the Reversal & Follow The Trend family.
2. Zone Oscillator Filter, an internal momentum filter confirming whether the market’s underlying force supports a Buy or Sell setup.
The purpose is to detect high-probability reversal or continuation entries, filter out low-momentum noise, and provide clear visual HUD, TP/SL levels, and alert messages ready for automation or manual trading.
⚙️ Core Components and Features
1. Helper & Input Parameters
RSI / EMA / ATR system: defines short-term bias and volatility context.
1. Sensitivity modes:
Aggressive – fast signals, looser filters
Normal – balanced setup
Conservative – slower, high-confidence signals
2. Higher Timeframe (HTF) confirmation: secondary EMA trend from the 30-minute chart.
3. Signal Cooldown: prevents consecutive entries within X bars to avoid over-trading.
4. Flexible alert options: choose Both, Buy Only, Sell Only, or None.
⚙️Market Structure & Zone Logic
The script constantly scans for demand and supply zones:
Demand Zone: price sits in the lower 35% of the recent 35-bar range.
Supply Zone: price sits in the upper 35% of the same range.
This defines potential reversal zones, later combined with RSI, momentum, and candle pattern conditions.
⚙️Momentum, Volume & Pattern Engine
1. RSI Slope + Rate of Change: creates a composite “pressure” signal to read buying/selling acceleration.
2. Volume & ATR spikes: confirm when volatility and participation rise sharply.
3. Candle patterns:
Bullish engulfing / pin bar → potential upward reversal
Bearish engulfing / pin bar → potential downward reversal
All these elements contribute to the Confidence Score (0–100%) for each direction.
⚙️Adaptive Confidence System
The script calculates a weighted confidence blend of:
1.RSI displacement
2.Zone location (Demand/Supply)
3.ATR activity
4.Distance from EMA
5.Momentum bursts
6.HTF trend alignment
It produces:
Bullish Probability
Bearish Probability
Both normalized via a sigmoid curve (0–100%).
The highest probability defines the current market bias and feeds into the HUD display and signal logic.
⚙️Zone Oscillator Filter (Internal Indicator #2)
This module acts as an FTT-momentum validator:
1. Measures how far price is from the EMA, normalized by ATR.
-Smoothed with a small EMA (smoothLen = 3).
-Defines three states:
BUY Zone: oscillator ≥ +0.5 → bullish momentum confirmed.
SELL Zone: oscillator ≤ –0.5 → bearish momentum confirmed.
Neutral: between thresholds.
Only signals that agree with this filter are allowed to print on chart (for example, a BUY signal only appears when the Zone Osc confirms a bullish area).
⚙️HUD (Head-Up Display)
⚙️Signal Generation Logic
1. BUY / SELL – Reversal Mode
Triggered when:
-Probability ≥ threshold (default 70%)
-Zone alignment (Demand for BUY, Supply for SELL)
-Valid candle pattern + volume/ATR spike
-Directional confirmation (close > open for BUY etc.)
-Reversal-Gate condition: price deviated by ≥ 1.2× ATR from EMA (anti-false-signal gate)
-HTF agrees (no conflict with higher-timeframe trend)
2.FTT (Follow-The-Trend) Mode
Triggered when:
-Trend direction confirmed on both M5 & HTF
-Pullback within ATR range (0.6×) and rebound confirmed by pressure or pattern
-Minimum confirmation count achieved (default 2)
3. Zone Osc Filter
Even after all above, signals are suppressed unless the Zone Oscillator agrees with direction (i.e. only show BUY inside BUY Zone, SELL inside SELL Zone).
4. Cooldown Enforcement
After any valid signal, system pauses new entries until cooldown bars elapse.
⚙️TP/SL Management System based on ATR
⚙️Alert System
🎯 How to Interpret
1. Check the HUD first:
Confidence > 70% → potential entry zone.
Zone Osc = BUY ZONE → only look for BUY REV/FTT.
Zone Osc = SELL ZONE → only look for SELL REV/FTT.
2. Wait for valid signal marker (triangle for REV, cross for FTT).
3. Observe TP/SL lines for realistic trade targets.
4. Respect Cooldown Timer to avoid overlapping entries.
1. FTT (Follow-The-Trend / Trend Continuation logic) from the Reversal & Follow The Trend family.
2. Zone Oscillator Filter, an internal momentum filter confirming whether the market’s underlying force supports a Buy or Sell setup.
The purpose is to detect high-probability reversal or continuation entries, filter out low-momentum noise, and provide clear visual HUD, TP/SL levels, and alert messages ready for automation or manual trading.
⚙️ Core Components and Features
1. Helper & Input Parameters
RSI / EMA / ATR system: defines short-term bias and volatility context.
1. Sensitivity modes:
Aggressive – fast signals, looser filters
Normal – balanced setup
Conservative – slower, high-confidence signals
2. Higher Timeframe (HTF) confirmation: secondary EMA trend from the 30-minute chart.
3. Signal Cooldown: prevents consecutive entries within X bars to avoid over-trading.
4. Flexible alert options: choose Both, Buy Only, Sell Only, or None.
⚙️Market Structure & Zone Logic
The script constantly scans for demand and supply zones:
Demand Zone: price sits in the lower 35% of the recent 35-bar range.
Supply Zone: price sits in the upper 35% of the same range.
This defines potential reversal zones, later combined with RSI, momentum, and candle pattern conditions.
⚙️Momentum, Volume & Pattern Engine
1. RSI Slope + Rate of Change: creates a composite “pressure” signal to read buying/selling acceleration.
2. Volume & ATR spikes: confirm when volatility and participation rise sharply.
3. Candle patterns:
Bullish engulfing / pin bar → potential upward reversal
Bearish engulfing / pin bar → potential downward reversal
All these elements contribute to the Confidence Score (0–100%) for each direction.
⚙️Adaptive Confidence System
The script calculates a weighted confidence blend of:
1.RSI displacement
2.Zone location (Demand/Supply)
3.ATR activity
4.Distance from EMA
5.Momentum bursts
6.HTF trend alignment
It produces:
Bullish Probability
Bearish Probability
Both normalized via a sigmoid curve (0–100%).
The highest probability defines the current market bias and feeds into the HUD display and signal logic.
⚙️Zone Oscillator Filter (Internal Indicator #2)
This module acts as an FTT-momentum validator:
1. Measures how far price is from the EMA, normalized by ATR.
-Smoothed with a small EMA (smoothLen = 3).
-Defines three states:
BUY Zone: oscillator ≥ +0.5 → bullish momentum confirmed.
SELL Zone: oscillator ≤ –0.5 → bearish momentum confirmed.
Neutral: between thresholds.
Only signals that agree with this filter are allowed to print on chart (for example, a BUY signal only appears when the Zone Osc confirms a bullish area).
⚙️HUD (Head-Up Display)
⚙️Signal Generation Logic
1. BUY / SELL – Reversal Mode
Triggered when:
-Probability ≥ threshold (default 70%)
-Zone alignment (Demand for BUY, Supply for SELL)
-Valid candle pattern + volume/ATR spike
-Directional confirmation (close > open for BUY etc.)
-Reversal-Gate condition: price deviated by ≥ 1.2× ATR from EMA (anti-false-signal gate)
-HTF agrees (no conflict with higher-timeframe trend)
2.FTT (Follow-The-Trend) Mode
Triggered when:
-Trend direction confirmed on both M5 & HTF
-Pullback within ATR range (0.6×) and rebound confirmed by pressure or pattern
-Minimum confirmation count achieved (default 2)
3. Zone Osc Filter
Even after all above, signals are suppressed unless the Zone Oscillator agrees with direction (i.e. only show BUY inside BUY Zone, SELL inside SELL Zone).
4. Cooldown Enforcement
After any valid signal, system pauses new entries until cooldown bars elapse.
⚙️TP/SL Management System based on ATR
⚙️Alert System
🎯 How to Interpret
1. Check the HUD first:
Confidence > 70% → potential entry zone.
Zone Osc = BUY ZONE → only look for BUY REV/FTT.
Zone Osc = SELL ZONE → only look for SELL REV/FTT.
2. Wait for valid signal marker (triangle for REV, cross for FTT).
3. Observe TP/SL lines for realistic trade targets.
4. Respect Cooldown Timer to avoid overlapping entries.
Informacje o Wersji
update signalInformacje o Wersji
minor updateSkrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.