PROTECTED SOURCE SCRIPT
QuantTrader MTF Momentum — QUIET v6 (TG + Status Panel)

Here’s a clear, copy-friendly description for your latest script.
# QuantTrader MTF Momentum — QUIET v6 (TG + Status Panel)
## What it does (in one line)
Fires bar-close BUY/SELL signals only when **trend**, **multi-timeframe confirmation**, **momentum confluence**, and **market-quality filters** all align—then draws ATR-based stops/targets and (optionally) sends **Telegram** payloads via TradingView webhooks.
## Signal recipe
* **Trend**: Price vs a baseline (EMA/HMA/Supertrend).
* **HTF confirm** (optional): Higher-TF EMA must slope **up** & price above for longs (down/below for shorts).
* **Momentum score (0–3)**:
* RSI (level + 3-bar rising/falling)
* MACD (line cross + histogram sign)
* Stochastic (K/D cross from OS/OB)
You choose **Min Momentum Signals** (default 2).
* **Market-quality gates**: ATR regime (vs median ATR), ADX threshold, Choppiness ceiling, and **Min body vs ATR** (filters tiny/noise bars).
* **Breakout filter** (optional): Donchian close > prior High (long) or < prior Low (short).
* **Sessions** (optional): Only trade in enabled (Asian/London/NY) windows.
## Quiet vs Loose mode
* **Quiet ON (default)**: All gates must be OK (trend+HTF, momentum ≥ min, ATR/ADX/Chop/Body, and Donchian if enabled).
* **Quiet OFF**: Easier entry—Trend OK + Momentum ≥1 + ATR regime OK.
## Presets
* **Forex Fast / Balanced 5m London / Strict 5m London / 15m London** (legacy choices).
* Each preset nudges RSI levels, ATR band, ADX, Chop, Min body, HTF TF, and Min-Momentum so behavior matches the instrument/timeframe. You can override any input.
## Status Panel (on-chart)
A live checklist showing why a trade is (not) allowed:
* Session, Trend OK (UP/DN), Confluence (UP/DN), ATR Regime, ADX, Choppiness, Body vs ATR, Donchian, **MomScore U/D**.
* **BUY Gate / SELL Gate**: whether rules allow a trade this bar.
* **Signal (this bar)**: what actually triggered at bar close (BUY / SELL / —).
## Risk overlay
On a signal bar, plots:
* **Stop** = ATR × multiple (default 1.8) from entry,
* **Targets** = 1R / 1.5R / 2R.
The script tracks TP1/TP2/TP3/STOP “hits” afterward and can alert them.
## Alerts & Telegram
* Create one TV alert: **Condition = “Any alert() function call”**, paste your webhook URL.
* In inputs, enable **Telegram** and set your `chat_id`.
* Script sends JSON payloads for **BUY/SELL** signals and **TP/SL hits** (includes preset, mode Q/L, momentum score, session, HTF TF).
## How to use (quick start)
1. Choose your **symbol/timeframe** (e.g., FX 5–15m; Gold 5m/15m; BTC 5m/15m).
2. Turn **Use Preset Profile ON** and pick a profile (e.g., “Strict 5m London” for EURUSD).
3. Keep **Quiet Mode ON** for cleaner signals.
4. Enter only when a **BUY/SELL** prints at bar close and **BUY/SELL Gate** is OK.
5. Use plotted **Stop/Targets** for risk planning; optional Telegram alerts will confirm TP/SL events.
## Notes
* Signals are **bar-close**, reducing flicker/repaint behavior.
* It’s an **entry framework**—add your sizing & management.
* Tune Min-Momentum, ADX, ATR band, and Donchian per instrument to balance **frequency vs. quality**.
# QuantTrader MTF Momentum — QUIET v6 (TG + Status Panel)
## What it does (in one line)
Fires bar-close BUY/SELL signals only when **trend**, **multi-timeframe confirmation**, **momentum confluence**, and **market-quality filters** all align—then draws ATR-based stops/targets and (optionally) sends **Telegram** payloads via TradingView webhooks.
## Signal recipe
* **Trend**: Price vs a baseline (EMA/HMA/Supertrend).
* **HTF confirm** (optional): Higher-TF EMA must slope **up** & price above for longs (down/below for shorts).
* **Momentum score (0–3)**:
* RSI (level + 3-bar rising/falling)
* MACD (line cross + histogram sign)
* Stochastic (K/D cross from OS/OB)
You choose **Min Momentum Signals** (default 2).
* **Market-quality gates**: ATR regime (vs median ATR), ADX threshold, Choppiness ceiling, and **Min body vs ATR** (filters tiny/noise bars).
* **Breakout filter** (optional): Donchian close > prior High (long) or < prior Low (short).
* **Sessions** (optional): Only trade in enabled (Asian/London/NY) windows.
## Quiet vs Loose mode
* **Quiet ON (default)**: All gates must be OK (trend+HTF, momentum ≥ min, ATR/ADX/Chop/Body, and Donchian if enabled).
* **Quiet OFF**: Easier entry—Trend OK + Momentum ≥1 + ATR regime OK.
## Presets
* **Forex Fast / Balanced 5m London / Strict 5m London / 15m London** (legacy choices).
* Each preset nudges RSI levels, ATR band, ADX, Chop, Min body, HTF TF, and Min-Momentum so behavior matches the instrument/timeframe. You can override any input.
## Status Panel (on-chart)
A live checklist showing why a trade is (not) allowed:
* Session, Trend OK (UP/DN), Confluence (UP/DN), ATR Regime, ADX, Choppiness, Body vs ATR, Donchian, **MomScore U/D**.
* **BUY Gate / SELL Gate**: whether rules allow a trade this bar.
* **Signal (this bar)**: what actually triggered at bar close (BUY / SELL / —).
## Risk overlay
On a signal bar, plots:
* **Stop** = ATR × multiple (default 1.8) from entry,
* **Targets** = 1R / 1.5R / 2R.
The script tracks TP1/TP2/TP3/STOP “hits” afterward and can alert them.
## Alerts & Telegram
* Create one TV alert: **Condition = “Any alert() function call”**, paste your webhook URL.
* In inputs, enable **Telegram** and set your `chat_id`.
* Script sends JSON payloads for **BUY/SELL** signals and **TP/SL hits** (includes preset, mode Q/L, momentum score, session, HTF TF).
## How to use (quick start)
1. Choose your **symbol/timeframe** (e.g., FX 5–15m; Gold 5m/15m; BTC 5m/15m).
2. Turn **Use Preset Profile ON** and pick a profile (e.g., “Strict 5m London” for EURUSD).
3. Keep **Quiet Mode ON** for cleaner signals.
4. Enter only when a **BUY/SELL** prints at bar close and **BUY/SELL Gate** is OK.
5. Use plotted **Stop/Targets** for risk planning; optional Telegram alerts will confirm TP/SL events.
## Notes
* Signals are **bar-close**, reducing flicker/repaint behavior.
* It’s an **entry framework**—add your sizing & management.
* Tune Min-Momentum, ADX, ATR band, and Donchian per instrument to balance **frequency vs. quality**.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.