Viprasol Multi-Timeframe Trend Signal Engine## Overview
The Multi-Timeframe Trend Signal Engine is a comprehensive trading system that combines SuperTrend-based signals with a 6-timeframe ADX trend dashboard, EMA trend ribbon, chaos trend line, order blocks, and risk management — all in one overlay. It scans 5m through Daily timeframes using ADX-based trend detection and calculates a confluence score (0-6) showing how many timeframes agree on direction. Built for traders who want multi-timeframe confirmation before entering trades.
## What Is Original (Viprasol Additions)
The following features were designed and implemented by Viprasol and do not exist in the original script:
1. **MTF Confluence Score (0-6)** — Counts how many of the 6 monitored timeframes (5m, 15m, 1H, 4H, 12H, Daily) currently show a bullish ADX trend. Displayed in the dashboard as "X/6 Bullish" with color coding: green (5-6), yellow (3-4), red (0-2). A separate bear confluence count is also tracked. This gives traders an instant read on multi-timeframe alignment strength.
2. **Enhanced Dashboard Rows** — The original dashboard only showed 6 timeframe trend readings with volatility and RSI. Viprasol added three additional rows: (a) MTF Confluence Score alongside Ribbon trend status, (b) Last Signal direction (Buy/Sell) alongside Chaos Trend status (Bullish/Bearish), and (c) a branded footer row. The dashboard now shows 10 rows of information instead of 8.
3. **MTF Alignment Alerts** — Two new alert conditions that fire when 5 or more of the 6 timeframes agree on direction (Strong Bullish Alignment and Strong Bearish Alignment). These did not exist in the original and provide automated notification of high-confluence multi-timeframe setups.
4. **Ribbon Trend Change Alerts** — Two alert conditions for when the EMA ribbon crosses from bullish to bearish or vice versa. The original had trend change alerts but they were tied to the ribbon state variable directly — the Viprasol version uses edge detection (`ribbonBullish and not ribbonBullish `) for precise single-bar firing.
5. **Tooltips on All Inputs** — Every input parameter (25+) has a descriptive tooltip explaining its function, recommended values, and behavior. The original had tooltips on only 3 inputs (sensitivity, signal type, and EMA length).
6. **Reorganized Input Groups** — Inputs reorganized from 4 groups (Main, Trend, Advanced, Dashboard) into 5 semantically clearer groups (Main Settings, Trend Settings, Signal Settings, Dashboard Settings, Risk Management) with consistent naming and inline layouts.
7. **Viprasol Dashboard Styling** — Branded header ("Viprasol - MTF Trend Signal Engine"), dark theme color scheme (#111725 background, #18233a header), and branded footer with version number.
## How It Works
**SuperTrend Signals:**
A custom SuperTrend calculation generates buy/sell signals using ATR-based dynamic bands. All signals require bar-close confirmation to prevent repainting. Two modes are available: "All Signals" shows every crossover, while "Filtered Signals" adds an EMA filter requiring price to be above/below the main EMA for additional confirmation.
**Multi-Timeframe ADX Dashboard:**
The indicator fetches ADX trend quality from 6 timeframes (5m, 15m, 1H, 4H, 12H, Daily) using an anti-repaint security function (`src ` with `lookahead_on` — confirmed previous bar only). Each timeframe is classified as Bullish (ADX above adaptive threshold), Bearish (below threshold), or Neutral. The confluence score counts how many timeframes are bullish (0-6), providing an at-a-glance alignment reading.
**Trend Ribbon:**
Five EMAs (20, 25, 35, 45, 55) form a color-coded ribbon that shifts between bullish and bearish states on crossover. The ribbon provides visual trend context independent of the signal system.
**EMA Cloud:**
The 150/250 EMA cloud identifies longer-term structural trend direction. Green fill indicates bullish structure, red indicates bearish.
**Chaos Trend Line:**
An adaptive trend line using pivot-based detection with ATR channels. It tracks the trend using highest/lowest pivot levels and changes color on confirmed reversals.
**Order Blocks:**
Structural order blocks based on pivot break of structure. Bullish OBs form at swing lows when higher highs break structure; bearish OBs form at swing highs when lower lows break structure. Boxes fade when tested and are removed when fully invalidated.
**RSI Take Profit System:**
A sequential TP system using RSI crossovers at 70/85/100 (bullish) and 30/15/5 (bearish). Each TP level only fires after the previous one has triggered within the current signal, creating a staged exit approach.
**Reversal Signals:**
A 25-period RSI-based reversal detector that fires when RSI crosses above oversold (25) or below overbought (75) levels, using bar-close confirmation.
## Key Features
- Custom SuperTrend signals with bar-close confirmation (no repainting on confirmed bars)
- Two signal modes: All Signals and EMA-Filtered Signals
- 6-timeframe ADX trend dashboard (5m, 15m, 1H, 4H, 12H, Daily)
- MTF Confluence Score (0-6) — count of bullish timeframes
- 5-EMA trend ribbon with color-coded direction
- EMA 150/250 cloud for structural trend
- Adaptive chaos trend line with pivot detection
- Structural order blocks with auto-invalidation
- RSI-based sequential take profit system (TP1/TP2/TP3)
- Visual-only TP/SL risk management lines
- RSI reversal signals at extreme levels
- Channel breakout levels from pivot highs/lows
- 3 candle coloring modes (Scalper RSI, Trend Ribbon, EMA Direction)
- RSI background zones for overbought/oversold
- Configurable dashboard position (3 locations) and font size (4 sizes)
- All visual elements individually toggleable
- 10 alert conditions with dynamic messages
## How to Use
**Reading the Dashboard:**
- Check the MTF Confluence Score first — 5-6/6 Bullish = strong alignment for longs, 0-1/6 = strong alignment for shorts
- Individual timeframe trends show where agreement and disagreement exist
- Ribbon and Chaos Trend rows provide additional trend context
**Signal Interpretation:**
- Use "Filtered Signals" mode for higher-quality entries aligned with the main EMA
- Use "All Signals" mode for more frequent entries in ranging markets
- Reversal signals (purple labels) indicate potential exhaustion at RSI extremes
- TP1/TP2/TP3 markers provide staged exit targets based on RSI momentum
**Recommended Settings:**
- Scalping (1m-5m): Sensitivity 2.0, ATR Factor 8, Filtered mode
- Intraday (15m-1H): Sensitivity 2.5, ATR Factor 11, All Signals mode
- Swing (4H-1D): Sensitivity 3.0, ATR Factor 14, Filtered mode
## Settings
| Group | Description |
|---|---|
| Main Settings | Sensitivity (signal frequency), Signal Mode (All/Filtered), ATR Factor (band width) |
| Trend Settings | Toggle trend ribbon, EMA cloud, chaos trend line, order blocks, main EMA (with custom period) |
| Signal Settings | Show/hide signals, candle coloring mode, RSI background zones, channel breakouts |
| Dashboard Settings | Show/hide dashboard, position (3 options), font size (4 options) |
| Risk Management | Visual-only TP/SL lines with adjustable TP strength, individual TP level toggles |
## Alerts
1. **Buy Signal** — SuperTrend crossover buy confirmed at bar close
2. **Sell Signal** — SuperTrend crossover sell confirmed at bar close
3. **Filtered Buy** — Buy signal with price above main EMA
4. **Filtered Sell** — Sell signal with price below main EMA
5. **Reversal Up** — RSI crosses above oversold level
6. **Reversal Down** — RSI crosses below overbought level
7. **Ribbon Turned Bullish** — EMA ribbon crosses to bullish state
8. **Ribbon Turned Bearish** — EMA ribbon crosses to bearish state
9. **Strong Bullish MTF Alignment** — 5+ of 6 timeframes showing bullish trend
10. **Strong Bearish MTF Alignment** — 5+ of 6 timeframes showing bearish trend
All alerts include {{ticker}}, {{close}}, and {{interval}} for dynamic notification messages.
## Limitations & Disclaimer
- MTF data uses the anti-repaint pattern (previous bar + lookahead) to avoid repainting on confirmed bars. However, the current bar's data updates in real-time until confirmed.
- ADX trend classification uses an adaptive threshold (median ADX x multiplier), which means "Neutral" readings are relative to recent volatility, not fixed levels.
- The RSI TP system is sequential — TP2 only fires after TP1, and TP3 after TP2. If TP1 never triggers, later levels will not fire.
- Order blocks are based on a simplified break-of-structure method using 3-bar pivots. They are not equivalent to institutional order flow.
- The Risk Management TP/SL lines are VISUAL ONLY — they do not execute trades.
- Candle coloring modes use different data sources — ensure you understand which mode is active.
- This indicator is for educational and analytical purposes only — it is not financial advice. Always use proper risk management and test on a demo account first.
## Credits & Attribution
The original script provides the SuperTrend signal engine, EMA trend ribbon, EMA cloud, chaos trend line, MTF ADX dashboard (6 timeframes), order block detection, RSI take profit system, risk management TP/SL lines, reversal signals, channel breakouts, candle coloring modes, volatility measurement, and 8 alert conditions.
All enhancements listed in the "What Is Original" section above were designed and implemented by Viprasol.
Published open-source per TradingView's open-source reuse guidelines.
อินดิเคเตอร์ Pine Script®






















