PROTECTED SOURCE SCRIPT
MasterEdge v4 — Trend & Momentum Presets with Filters & ATR Risk

MasterEdge v4 — Trend & Momentum with Filters & ATR Risk
MasterEdge v4 is a multi‑timeframe trend and momentum indicator designed to help you stay on the right side of the market while controlling risk. It combines two classic signal engines—Donchian channel breakouts (à la Turtle Traders) and moving‑average crosses—with a suite of filters and risk tools to reduce false signals and keep you disciplined.
## Core features
- **Auto/manual presets:** Automatically adjusts look‑back lengths and thresholds based on the instrument (crypto, forex, indices, etc.) and chart timeframe, or lets you set them manually.
- **Higher‑timeframe bias:** Uses a non‑repainting higher‑timeframe EMA to determine whether the market is trending up or down and gates signals accordingly. You can choose the HTF yourself or let the auto‑engine pick one.
- **Dual signal modes:**
- *Donchian (Turtle)* mode enters on breakouts of an N‑bar channel and exits on a shorter channel.
- *MA Cross* mode buys when a fast EMA/SMA crosses above a slow EMA/SMA and sells on the opposite cross.
- **Advanced filters:** RSI momentum and ADX trend‑strength filters help avoid trades during choppy conditions. Optional volume and HTF‑slope filters require participation and higher‑timeframe momentum. A configurable **quality score** combines these filters so you only take higher‑probability setups.
- **ATR risk rails & position sizing:** Visual stop‑loss and target rails are calculated from ATR to adapt to volatility. An optional position‑size suggestion uses your account size and risk percentage to estimate how much to trade (for informational purposes only).
- **Session gating & status table:** Restrict signals to specific trading sessions. A live table shows your current settings, filter status, quality score and recommended position size, so you always know why a signal fired—or didn’t.
- **Alerts:** Separate long and short alerts with static JSON payloads let you hook the indicator into your notification or webhook workflow.
## How to use
1. **Select auto or manual:** Use the *Preset Mode* input. Auto mode adjusts lengths and thresholds to the ticker and timeframe; manual mode lets you set them explicitly.
2. **Choose a signal mode:** Pick between Donchian breakout or MA cross. Donchian is often better for lower‑timeframe breakouts; MA crosses smooth out noise on higher timeframes.
3. **Enable filters:** Turn on RSI, ADX, volume and/or slope filters and set your desired quality‑score threshold. Higher thresholds yield fewer, cleaner signals.
4. **Define risk:** If you want visual risk guides and position‑size suggestions, leave ATR rails on and input your account size, risk percentage and value per point.
5. **Timeframe pairing:** For intraday trading, try a 5 min chart with a 60 min bias; for swing trading, use a 1 h chart with a 4 h bias. The auto‑engine selects sensible higher‑timeframe defaults, but you can override them.
6. **Confirm signals:** The indicator plots green triangles below bars for long signals and red triangles above bars for short signals. The status table updates each bar with filter states and whether a signal is active.
**Disclaimer:** This script is for educational and analysis purposes only and is not financial advice. Always test on a demo account before trading live and tailor the settings to your strategy, risk tolerance and market behaviour.
MasterEdge v4 is a multi‑timeframe trend and momentum indicator designed to help you stay on the right side of the market while controlling risk. It combines two classic signal engines—Donchian channel breakouts (à la Turtle Traders) and moving‑average crosses—with a suite of filters and risk tools to reduce false signals and keep you disciplined.
## Core features
- **Auto/manual presets:** Automatically adjusts look‑back lengths and thresholds based on the instrument (crypto, forex, indices, etc.) and chart timeframe, or lets you set them manually.
- **Higher‑timeframe bias:** Uses a non‑repainting higher‑timeframe EMA to determine whether the market is trending up or down and gates signals accordingly. You can choose the HTF yourself or let the auto‑engine pick one.
- **Dual signal modes:**
- *Donchian (Turtle)* mode enters on breakouts of an N‑bar channel and exits on a shorter channel.
- *MA Cross* mode buys when a fast EMA/SMA crosses above a slow EMA/SMA and sells on the opposite cross.
- **Advanced filters:** RSI momentum and ADX trend‑strength filters help avoid trades during choppy conditions. Optional volume and HTF‑slope filters require participation and higher‑timeframe momentum. A configurable **quality score** combines these filters so you only take higher‑probability setups.
- **ATR risk rails & position sizing:** Visual stop‑loss and target rails are calculated from ATR to adapt to volatility. An optional position‑size suggestion uses your account size and risk percentage to estimate how much to trade (for informational purposes only).
- **Session gating & status table:** Restrict signals to specific trading sessions. A live table shows your current settings, filter status, quality score and recommended position size, so you always know why a signal fired—or didn’t.
- **Alerts:** Separate long and short alerts with static JSON payloads let you hook the indicator into your notification or webhook workflow.
## How to use
1. **Select auto or manual:** Use the *Preset Mode* input. Auto mode adjusts lengths and thresholds to the ticker and timeframe; manual mode lets you set them explicitly.
2. **Choose a signal mode:** Pick between Donchian breakout or MA cross. Donchian is often better for lower‑timeframe breakouts; MA crosses smooth out noise on higher timeframes.
3. **Enable filters:** Turn on RSI, ADX, volume and/or slope filters and set your desired quality‑score threshold. Higher thresholds yield fewer, cleaner signals.
4. **Define risk:** If you want visual risk guides and position‑size suggestions, leave ATR rails on and input your account size, risk percentage and value per point.
5. **Timeframe pairing:** For intraday trading, try a 5 min chart with a 60 min bias; for swing trading, use a 1 h chart with a 4 h bias. The auto‑engine selects sensible higher‑timeframe defaults, but you can override them.
6. **Confirm signals:** The indicator plots green triangles below bars for long signals and red triangles above bars for short signals. The status table updates each bar with filter states and whether a signal is active.
**Disclaimer:** This script is for educational and analysis purposes only and is not financial advice. Always test on a demo account before trading live and tailor the settings to your strategy, risk tolerance and market behaviour.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。