OPEN-SOURCE SCRIPT

byquan AlphaTrend + Supertrend Combo

88
AlphaTrend + Supertrend Combo (Confirmation-Based Indicator)
Description

AlphaTrend + Supertrend Combo is a confirmation-based technical indicator that combines momentum-sensitive trend tracking with ATR-based trend structure.

The script is designed to highlight situations where two independent trend-following methods agree within a short time window, helping users visually identify moments of potential trend alignment.

This indicator is intended for technical analysis and educational use only.

Conceptual Idea

The core concept of this indicator is confirmation, not prediction.

Instead of relying on a single signal source, the script observes:

A volatility-adjusted trend line (AlphaTrend)

A price-structure-based trend switch (Supertrend)

A signal is displayed only when both methods confirm each other within a limited number of bars.

Indicator Components
1. AlphaTrend Module

AlphaTrend is calculated using:

ATR-based dynamic levels

Momentum evaluation via:

Money Flow Index (MFI), or

RSI when volume data is unavailable

This module adapts its direction based on market momentum and volatility, producing trend transition events rather than continuous signals.

2. Supertrend Module

The Supertrend component uses:

ATR-based bands

Price crossing logic to define trend direction changes

Supertrend acts as a structural trend confirmation layer, reacting to changes in price behavior relative to volatility.

3. Confirmation Window Logic

Rather than requiring both indicators to trigger on the exact same bar, the script introduces a bar-based confirmation window:

When one indicator produces a signal

The script waits up to a user-defined number of bars

If the second indicator confirms within this window, the signal is considered valid

This approach allows for natural timing differences between indicators while avoiding long-delayed confirmations.

Signal Logic Summary

BUY confirmation

AlphaTrend signals bullish direction

Supertrend confirms bullish direction within the waiting window

SELL confirmation

AlphaTrend signals bearish direction

Supertrend confirms bearish direction within the waiting window

Signals are displayed only when both conditions are satisfied.

Inputs Overview

Confirmation Bars

Defines how many bars the script waits for the second indicator to confirm

AlphaTrend Settings

Period, multiplier, source, and volume handling options

Supertrend Settings

ATR period, multiplier, and calculation method

All parameters are user-adjustable to support different instruments and timeframes.

Intended Use

This indicator is designed to be used as:

A confirmation or alignment tool

A visual aid for studying trend behavior

A supporting layer within a broader analysis framework

It is not intended to:

Predict market direction

Serve as a complete trading system

Replace risk management or personal judgment

Technical Notes

The script is rule-based and deterministic

No repainting logic is used

Signals depend strictly on historical and current bar data

Results may vary across symbols, sessions, and timeframes

Attribution & Transparency

This script represents a custom integration and modification of widely known technical analysis concepts, including:

AlphaTrend-style volatility-adjusted trend tracking

Supertrend ATR-based trend logic

These methods are commonly documented in technical analysis literature.
The implementation, parameter structure, and confirmation logic reflect a personal adaptation and combination, not a claim of originality over the underlying concepts.

Disclaimer

This indicator is provided for educational and analytical purposes only.
It does not constitute financial advice, investment recommendations, or an invitation to trade.

Past behavior does not guarantee future outcomes.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。