PROTECTED SOURCE SCRIPT
Golden Ladder – Louay Joha (Wave & Gann Hi/Lo + ATR R-Levels)

Overview
Golden Ladder is a momentum-and-structure tool that detects three-bar ladder waves and filters them with a Gann Hi/Lo regime guide (SMA-based). When a valid wave aligns with the current Hi/Lo bias and passes optional market filters (ADX, RSI, and proximity to recent extremes), the script prints BUY/SELL n labels (n = wave index) and draws a complete Entry / SL / TP1–TP4 ladder using ATR-based risk units (R) or fixed caps—configured for clarity and consistency. The script also keeps the chart clean: the last trade remains fully drawn while historical groups are trimmed to compact “ENTRY-only” stubs.
Why these components together (originality)
Three-bar ladder captures short-term momentum structure (progressively higher highs/lows for buys; the reverse for sells).
Gann Hi/Lo (SMA of highs/lows with a directional state) acts as a regime filter, reducing counter-trend ladders.
ATR-based R ladder turns signals into an actionable plan: a volatility-aware SL and TP1–TP4 that scale across instruments/timeframes.
Smart Entry filters (ADX strength, RSI extremes, and distance from recent top/bottom using ATR buffers) seek to avoid low-quality, stretched entries.
Slim history keeps only a short ENTRY stub for prior groups, so the signal you just got is always the most readable.
This is not a mere mashup; each layer constrains the others to produce fewer, clearer setups.
How it works (high-level logic)
Regime (Gann Hi/Lo):
Compute SMA(high, HPeriod) and SMA(low, LPeriod).
Direction state HLv flips when the close crosses above/below its track; one unified Hi/Lo guide is plotted.
Ladder signal (structure + confirmation):
BUY ladder: three consecutive green bars with rising highs and rising lows and HLv == +1.
SELL ladder: mirror conditions with HLv == -1.
Signals evaluate intrabar and are controlled by Smart Entry filters (ADX/RSI/extreme checks).
Risk ladder (R-based or capped):
Default: risk = ATR(atr_len) × SL_multiple and TPs in R.
Optional fixed caps by timeframe (e.g., M1/M5) using USD per point.
Longs: SL = entry – risk; TPi = entry + (Ri × risk).
Shorts: SL = entry + risk; TPi = entry – (Ri × risk).
All levels auto-reflow to the right as bars print.
Chart hygiene:
The latest trade shows ENTRY/SL/TP1–TP4 fully.
Older trades are automatically trimmed (only a short ENTRY line remains, with optional label).
Alerts:
BUY – Smart Entry (Tick) & SELL – Smart Entry (Tick) fire on live-qualified signals.
You can connect alerts to your automation, respecting your broker’s risk controls.
Inputs (English summary of UI)
Label settings: label size; ATR-based vs fixed-tick offsets; leader line width/transparency; horizontal label shift.
Gann Hi/Lo: HIGH Period (HPeriod), LOW Period (LPeriod).
Market filters: ADX (length, smoothing, minimum), RSI (length + caps), recent extremes (lookback + ATR buffer).
Entry/SL/TP Levels: TP1–TP4 (R), label right-shift, show last-trade prices on labels.
Fixed SL Caps: per-timeframe caps (M1/M5) via USD per point.
How to use
Apply on your instrument/timeframe; tune H/L periods and filters to your market (e.g., XAUUSD on M1/M5).
Favor signals aligned with the Hi/Lo regime; tighten filters (higher ADX, stricter RSI caps) to reduce noise.
Choose ATR-Risk or fixed caps depending on your preferences.
The drawing policy ensures the most recent trade remains front-and-center.
Notes & limitations
Signals can evaluate intrabar; MA-based context is inherently lagging.
ATR-based ladders adapt to volatility; extreme spikes can widen risk.
This is a technical analysis tool, not financial advice.
Golden Ladder is a momentum-and-structure tool that detects three-bar ladder waves and filters them with a Gann Hi/Lo regime guide (SMA-based). When a valid wave aligns with the current Hi/Lo bias and passes optional market filters (ADX, RSI, and proximity to recent extremes), the script prints BUY/SELL n labels (n = wave index) and draws a complete Entry / SL / TP1–TP4 ladder using ATR-based risk units (R) or fixed caps—configured for clarity and consistency. The script also keeps the chart clean: the last trade remains fully drawn while historical groups are trimmed to compact “ENTRY-only” stubs.
Why these components together (originality)
Three-bar ladder captures short-term momentum structure (progressively higher highs/lows for buys; the reverse for sells).
Gann Hi/Lo (SMA of highs/lows with a directional state) acts as a regime filter, reducing counter-trend ladders.
ATR-based R ladder turns signals into an actionable plan: a volatility-aware SL and TP1–TP4 that scale across instruments/timeframes.
Smart Entry filters (ADX strength, RSI extremes, and distance from recent top/bottom using ATR buffers) seek to avoid low-quality, stretched entries.
Slim history keeps only a short ENTRY stub for prior groups, so the signal you just got is always the most readable.
This is not a mere mashup; each layer constrains the others to produce fewer, clearer setups.
How it works (high-level logic)
Regime (Gann Hi/Lo):
Compute SMA(high, HPeriod) and SMA(low, LPeriod).
Direction state HLv flips when the close crosses above/below its track; one unified Hi/Lo guide is plotted.
Ladder signal (structure + confirmation):
BUY ladder: three consecutive green bars with rising highs and rising lows and HLv == +1.
SELL ladder: mirror conditions with HLv == -1.
Signals evaluate intrabar and are controlled by Smart Entry filters (ADX/RSI/extreme checks).
Risk ladder (R-based or capped):
Default: risk = ATR(atr_len) × SL_multiple and TPs in R.
Optional fixed caps by timeframe (e.g., M1/M5) using USD per point.
Longs: SL = entry – risk; TPi = entry + (Ri × risk).
Shorts: SL = entry + risk; TPi = entry – (Ri × risk).
All levels auto-reflow to the right as bars print.
Chart hygiene:
The latest trade shows ENTRY/SL/TP1–TP4 fully.
Older trades are automatically trimmed (only a short ENTRY line remains, with optional label).
Alerts:
BUY – Smart Entry (Tick) & SELL – Smart Entry (Tick) fire on live-qualified signals.
You can connect alerts to your automation, respecting your broker’s risk controls.
Inputs (English summary of UI)
Label settings: label size; ATR-based vs fixed-tick offsets; leader line width/transparency; horizontal label shift.
Gann Hi/Lo: HIGH Period (HPeriod), LOW Period (LPeriod).
Market filters: ADX (length, smoothing, minimum), RSI (length + caps), recent extremes (lookback + ATR buffer).
Entry/SL/TP Levels: TP1–TP4 (R), label right-shift, show last-trade prices on labels.
Fixed SL Caps: per-timeframe caps (M1/M5) via USD per point.
How to use
Apply on your instrument/timeframe; tune H/L periods and filters to your market (e.g., XAUUSD on M1/M5).
Favor signals aligned with the Hi/Lo regime; tighten filters (higher ADX, stricter RSI caps) to reduce noise.
Choose ATR-Risk or fixed caps depending on your preferences.
The drawing policy ensures the most recent trade remains front-and-center.
Notes & limitations
Signals can evaluate intrabar; MA-based context is inherently lagging.
ATR-based ladders adapt to volatility; extreme spikes can widen risk.
This is a technical analysis tool, not financial advice.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。