OPEN-SOURCE SCRIPT
eXeTRADE Main Dual Score Signal Indicator

# eXeTRADE-Main — Dual-Score Signal Indicator
**Trend • Support/Resistance • Higher-Timeframe • Backtest — all in one score**
---
## What it does
eXeTRADE-Main is a multi-factor signal indicator built for medium-to-experienced traders on **1H, 4H, and Daily** timeframes. It calculates **Long and Short scores independently** from five weighted layers — Trend, Support/Resistance, Momentum, Higher Timeframe, and Risk/Reward — and produces three signal grades:
- **Strong Buy / Sell** — score ≥ 90
- **Normal Buy / Sell** — score ≥ 75
- **Range Buy / Sell** — when R:R ≥ 3.0
The indicator is designed for **plan-driven, low-risk trading**. It auto-detects trend lines and parallel channels, ranks the top three S/R levels by strength, runs a weekly Best-MA backtest, and applies a **Proximity Gate** that penalises signals fired too close to a strong opposing level — the most common cause of immediate reversals.
## Key features
- Dual scoring — Long and Short calculated independently (0–100 scale)
- 14-MA + Best-MA weekly backtest (Trade / Long / Short / S/R averages auto-tuned)
- 3-layer trend line + parallel channel auto-detection with break tracking
- Pivot-based S/R with touch counting and violation tracking; top 3 selected by strength
- HTF context — EMA50/200, RSI, pivot, Ichimoku cloud, and volume folded into the score
- **Proximity Gate** — soft-block or hard-block when entry sits within 0.5×ATR of opposing S/R
- Built-in backtest engine with S/R trailing stop
- Position-management panel for manual entry / TP / SL tracking
- Single consolidated master alert (one alert covers every signal and trail event)
## How to read the chart
Numbered markers on the cover image:
1. **Score Panel** — current Long/Short scores with delta arrows, ATR, and trail status
2. **Top S/R Levels** — three strongest levels, ranked by point score
3. **Backtest Results** — trade count, win/loss, win rate, total P/L, max drawdown
4. **Buy Signal** — green triangle marks Strong / Normal / Range Buy entries
5. **Trail Exit** — yellow × marks where the trailing stop was hit
6. **Auto Trend Lines** — multi-layer trend with parallel channels
## Important settings
- **Backtest Period** — 1 Mo / 3 Mo / 6 Mo / 1 Yr / All
- **Entry Mode** — Single (one position) or Multi (pyramiding)
- **Signal Levels** — Strong (default 90) and Buy/Sell (default 75) thresholds
- **Proximity Gate Mode** — Off / Warning / Soft Block / Hard Block
- **HTF Auto-Bump** — automatically lifts the HTF reference one level if the chart TF matches HTF
## Alerts
A single **master alert** is recommended — it fires for every signal and trail event in one channel. Individual alerts (Strong Buy, Strong Sell, Trail Hit, Channel Break, etc.) are also available if granular control is preferred.
## Best on
4H and Daily timeframes for **Forex pairs, XAUUSD, XAGUSD, and major equities**. Not recommended below 1H — short-timeframe noise reduces score reliability.
## Disclaimer
This indicator is a decision-support tool, not financial advice. **Always define stop-loss and exit plan before entry.** Past performance does not guarantee future results. Trade at your own risk.
---
*Comments and feedback are welcome.*
**Trend • Support/Resistance • Higher-Timeframe • Backtest — all in one score**
---
## What it does
eXeTRADE-Main is a multi-factor signal indicator built for medium-to-experienced traders on **1H, 4H, and Daily** timeframes. It calculates **Long and Short scores independently** from five weighted layers — Trend, Support/Resistance, Momentum, Higher Timeframe, and Risk/Reward — and produces three signal grades:
- **Strong Buy / Sell** — score ≥ 90
- **Normal Buy / Sell** — score ≥ 75
- **Range Buy / Sell** — when R:R ≥ 3.0
The indicator is designed for **plan-driven, low-risk trading**. It auto-detects trend lines and parallel channels, ranks the top three S/R levels by strength, runs a weekly Best-MA backtest, and applies a **Proximity Gate** that penalises signals fired too close to a strong opposing level — the most common cause of immediate reversals.
## Key features
- Dual scoring — Long and Short calculated independently (0–100 scale)
- 14-MA + Best-MA weekly backtest (Trade / Long / Short / S/R averages auto-tuned)
- 3-layer trend line + parallel channel auto-detection with break tracking
- Pivot-based S/R with touch counting and violation tracking; top 3 selected by strength
- HTF context — EMA50/200, RSI, pivot, Ichimoku cloud, and volume folded into the score
- **Proximity Gate** — soft-block or hard-block when entry sits within 0.5×ATR of opposing S/R
- Built-in backtest engine with S/R trailing stop
- Position-management panel for manual entry / TP / SL tracking
- Single consolidated master alert (one alert covers every signal and trail event)
## How to read the chart
Numbered markers on the cover image:
1. **Score Panel** — current Long/Short scores with delta arrows, ATR, and trail status
2. **Top S/R Levels** — three strongest levels, ranked by point score
3. **Backtest Results** — trade count, win/loss, win rate, total P/L, max drawdown
4. **Buy Signal** — green triangle marks Strong / Normal / Range Buy entries
5. **Trail Exit** — yellow × marks where the trailing stop was hit
6. **Auto Trend Lines** — multi-layer trend with parallel channels
## Important settings
- **Backtest Period** — 1 Mo / 3 Mo / 6 Mo / 1 Yr / All
- **Entry Mode** — Single (one position) or Multi (pyramiding)
- **Signal Levels** — Strong (default 90) and Buy/Sell (default 75) thresholds
- **Proximity Gate Mode** — Off / Warning / Soft Block / Hard Block
- **HTF Auto-Bump** — automatically lifts the HTF reference one level if the chart TF matches HTF
## Alerts
A single **master alert** is recommended — it fires for every signal and trail event in one channel. Individual alerts (Strong Buy, Strong Sell, Trail Hit, Channel Break, etc.) are also available if granular control is preferred.
## Best on
4H and Daily timeframes for **Forex pairs, XAUUSD, XAGUSD, and major equities**. Not recommended below 1H — short-timeframe noise reduces score reliability.
## Disclaimer
This indicator is a decision-support tool, not financial advice. **Always define stop-loss and exit plan before entry.** Past performance does not guarantee future results. Trade at your own risk.
---
*Comments and feedback are welcome.*
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.