OPEN-SOURCE SCRIPT
Pro RSI + Stoch + ATR Dashboard (MASTER) by Ali

Multi-Timeframe Momentum + Volatility Alignment System
Trend Filtered MASTER Signals
Designed for Structured, Discipline-Based Trading
Pro RSI + Stoch + ATR Dashboard (MASTER) by Ali
Full Mathematical Logic & Professional Usage Guide
This indicator is a multi-timeframe momentum and volatility dashboard designed to combine:
RSI (Trend & Strength)
Stochastic (Timing & Trigger)
ATR & ATR% (Volatility & Risk Control)
Alignment Scoring (Market Structure Confirmation)
MASTER Signal Logic (Filtered Trade Execution)
The goal is simple:
Reduce overtrading.
Eliminate counter-trend entries.
Trade only when momentum alignment confirms structure.
1️⃣ Core Indicators & Mathematical Foundation
🔹 RSI (Relative Strength Index)
RSI measures the ratio between average gains and average losses over a defined period.
Formula:
RSI = 100 − [100 / (1 + RS)]
RS = Average Gain / Average Loss
Default Length: 14
Key Level:
RSI ≥ 50 → bullish momentum bias
RSI < 50 → bearish momentum bias
In this system, RSI 50 is used as:
Trend filter
Alignment scoring basis
🔹 Stochastic (K & D)
Stochastic measures where price closes relative to its recent range.
K line = smoothed momentum line
D line = signal line (smoothed K)
Default:
Length = 14
K smoothing = 3
D smoothing = 3
Trigger logic:
K crossing above D → bullish short-term trigger
K crossing below D → bearish short-term trigger
⚠ Stochastic alone does NOT generate signals.
It only acts as a timing mechanism inside MASTER logic.
🔹 ATR (Average True Range)
ATR measures market volatility.
True Range (TR) =
max(High−Low, |High−PrevClose|, |Low−PrevClose|)
ATR = Moving average of TR over N periods
Default Length: 14
ATR% = (ATR / Close) × 100
Why ATR% matters:
Higher ATR% → wider stops required
Lower ATR% → tighter structure, breakout potential
2️⃣ Multi-Timeframe Structure (MTF Logic)
The dashboard evaluates 4 timeframes simultaneously:
15m → Entry & Timing
1H → Short-term bias
4H → Structural trend
1D → Market regime
Each timeframe displays:
RSI
Stoch K/D
ATR
Status
This allows structured decision making instead of single-timeframe guessing.
3️⃣ MASTER Logic (Trend + Alignment + Trigger)
A MASTER signal is generated ONLY when all three layers align:
🔹 1) Trend Filter (RSI 50 on selected TF)
User selects Trend TF (1H / 4H / 1D)
If RSI ≥ 50 → LONG ONLY
If RSI < 50 → SHORT ONLY
This prevents counter-trend trading.
tr.tradingview.com/chart/dZSV5quY/?symbol=OANDA:XAUUSD
🔹 2) Alignment Score (MTF Confirmation)
Alignment counts how many timeframes have RSI ≥ 50.
bullCount = sum of bullish RSI conditions (0–4)
Score% = (bullCount / 4) × 100
Example:
4/4 (100%) → Full bullish alignment
2/4 (50%) → Mixed / chop conditions
0/4 (0%) → Full bearish regime
This prevents trading in unstable market environments.
tr.tradingview.com/chart/dZSV5quY/?symbol=OANDA:XAUUSD
🔹 3) Trigger (15m Stoch Cross)
Entry confirmation uses:
15m K crossing above D → bullish trigger
15m K crossing below D → bearish trigger
4️⃣ MASTER BUY / SELL Conditions
MASTER BUY:
Trend = LONG ONLY
bullCount ≥ Min Bull TF setting
15m Stoch bullish cross
MASTER SELL:
Trend = SHORT ONLY
bullCount ≤ Max Bull TF setting
15m Stoch bearish cross
This ensures:
Trend + Structure + Timing = One controlled signal.

5️⃣ Reading the Dashboard Table
Columns:
TIME → timeframe
RSI → momentum strength
K / D → stochastic timing
ATR → volatility
STATUS → simplified momentum state
STATUS is informational only.
It does NOT replace MASTER logic.
6️⃣ Center Info Label Explained
Displays:
TREND → Active direction filter
ALIGN → MTF momentum strength
ATR% → Volatility intensity across TFs
Professional usage:
ALIGN ≥ 75% → Strong trend continuation
ALIGN ≤ 50% → Chop / mean reversion zone
High ATR% → Adjust risk and position size
Low ATR% → Breakout probability increases
7️⃣ Recommended Settings by Trader Type
🔹 General / Balanced:
Trend TF: 4H
Min Bull BUY: 3
Max Bull SELL: 1
🔹 Intraday:
Trend TF: 1H or 4H
Min Bull BUY: 2–3
Max Bull SELL: 1–2

🔹 Scalper:
Trend TF: 1H
Min Bull BUY: 2
Max Bull SELL: 2

🔹 Swing:
Trend TF: 1D
Min Bull BUY: 3
Max Bull SELL: 1

8️⃣ Professional Trade Workflow
Check TREND first
Confirm ALIGN strength
Wait for 15m trigger
Enter with structure-based stop
Adjust position size using ATR%
This indicator is a structured decision framework, not a random signal generator.
Built for traders who value structure over impulse.
⚠ Risk Disclaimer This tool enhances structure and discipline. It does not predict markets. Best performance occurs in aligned trending environments.
Trend Filtered MASTER Signals
Designed for Structured, Discipline-Based Trading
Pro RSI + Stoch + ATR Dashboard (MASTER) by Ali
Full Mathematical Logic & Professional Usage Guide
This indicator is a multi-timeframe momentum and volatility dashboard designed to combine:
RSI (Trend & Strength)
Stochastic (Timing & Trigger)
ATR & ATR% (Volatility & Risk Control)
Alignment Scoring (Market Structure Confirmation)
MASTER Signal Logic (Filtered Trade Execution)
The goal is simple:
Reduce overtrading.
Eliminate counter-trend entries.
Trade only when momentum alignment confirms structure.
1️⃣ Core Indicators & Mathematical Foundation
🔹 RSI (Relative Strength Index)
RSI measures the ratio between average gains and average losses over a defined period.
Formula:
RSI = 100 − [100 / (1 + RS)]
RS = Average Gain / Average Loss
Default Length: 14
Key Level:
RSI ≥ 50 → bullish momentum bias
RSI < 50 → bearish momentum bias
In this system, RSI 50 is used as:
Trend filter
Alignment scoring basis
🔹 Stochastic (K & D)
Stochastic measures where price closes relative to its recent range.
K line = smoothed momentum line
D line = signal line (smoothed K)
Default:
Length = 14
K smoothing = 3
D smoothing = 3
Trigger logic:
K crossing above D → bullish short-term trigger
K crossing below D → bearish short-term trigger
⚠ Stochastic alone does NOT generate signals.
It only acts as a timing mechanism inside MASTER logic.
🔹 ATR (Average True Range)
ATR measures market volatility.
True Range (TR) =
max(High−Low, |High−PrevClose|, |Low−PrevClose|)
ATR = Moving average of TR over N periods
Default Length: 14
ATR% = (ATR / Close) × 100
Why ATR% matters:
Higher ATR% → wider stops required
Lower ATR% → tighter structure, breakout potential
2️⃣ Multi-Timeframe Structure (MTF Logic)
The dashboard evaluates 4 timeframes simultaneously:
15m → Entry & Timing
1H → Short-term bias
4H → Structural trend
1D → Market regime
Each timeframe displays:
RSI
Stoch K/D
ATR
Status
This allows structured decision making instead of single-timeframe guessing.
3️⃣ MASTER Logic (Trend + Alignment + Trigger)
A MASTER signal is generated ONLY when all three layers align:
🔹 1) Trend Filter (RSI 50 on selected TF)
User selects Trend TF (1H / 4H / 1D)
If RSI ≥ 50 → LONG ONLY
If RSI < 50 → SHORT ONLY
This prevents counter-trend trading.
tr.tradingview.com/chart/dZSV5quY/?symbol=OANDA:XAUUSD
🔹 2) Alignment Score (MTF Confirmation)
Alignment counts how many timeframes have RSI ≥ 50.
bullCount = sum of bullish RSI conditions (0–4)
Score% = (bullCount / 4) × 100
Example:
4/4 (100%) → Full bullish alignment
2/4 (50%) → Mixed / chop conditions
0/4 (0%) → Full bearish regime
This prevents trading in unstable market environments.
tr.tradingview.com/chart/dZSV5quY/?symbol=OANDA:XAUUSD
🔹 3) Trigger (15m Stoch Cross)
Entry confirmation uses:
15m K crossing above D → bullish trigger
15m K crossing below D → bearish trigger
4️⃣ MASTER BUY / SELL Conditions
MASTER BUY:
Trend = LONG ONLY
bullCount ≥ Min Bull TF setting
15m Stoch bullish cross
MASTER SELL:
Trend = SHORT ONLY
bullCount ≤ Max Bull TF setting
15m Stoch bearish cross
This ensures:
Trend + Structure + Timing = One controlled signal.
5️⃣ Reading the Dashboard Table
Columns:
TIME → timeframe
RSI → momentum strength
K / D → stochastic timing
ATR → volatility
STATUS → simplified momentum state
STATUS is informational only.
It does NOT replace MASTER logic.
6️⃣ Center Info Label Explained
Displays:
TREND → Active direction filter
ALIGN → MTF momentum strength
ATR% → Volatility intensity across TFs
Professional usage:
ALIGN ≥ 75% → Strong trend continuation
ALIGN ≤ 50% → Chop / mean reversion zone
High ATR% → Adjust risk and position size
Low ATR% → Breakout probability increases
7️⃣ Recommended Settings by Trader Type
🔹 General / Balanced:
Trend TF: 4H
Min Bull BUY: 3
Max Bull SELL: 1
🔹 Intraday:
Trend TF: 1H or 4H
Min Bull BUY: 2–3
Max Bull SELL: 1–2
🔹 Scalper:
Trend TF: 1H
Min Bull BUY: 2
Max Bull SELL: 2
🔹 Swing:
Trend TF: 1D
Min Bull BUY: 3
Max Bull SELL: 1
8️⃣ Professional Trade Workflow
Check TREND first
Confirm ALIGN strength
Wait for 15m trigger
Enter with structure-based stop
Adjust position size using ATR%
This indicator is a structured decision framework, not a random signal generator.
Built for traders who value structure over impulse.
⚠ Risk Disclaimer This tool enhances structure and discipline. It does not predict markets. Best performance occurs in aligned trending environments.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.