All indicators

Multi-TF AI-Enhanced SuperTrend with ADX Filter - Strategy

Nov 2, 2023

Static chart image
SignalsOscillatorsMachine LearningMoving AveragesVolatility

The Multi-TF AI-Enhanced SuperTrend with ADX Filter - Strategy indicator is a comprehensive trend-following tool that combines multi-timeframe analysis, machine learning classification, and trend strength filtering to generate robust trade signals. It utilizes two distinct SuperTrend calculations from different timeframes and refines them using a K-Nearest Neighbors (KNN) algorithm to improve trend accuracy and reduce lag.

Usage

The strategy is designed to identify high-probability trend reversals and continuations by requiring alignment across multiple layers of data.

  • Signal Generation: A "Long" signal is generated when both the primary and secondary AI-filtered SuperTrends indicate an uptrend, supported by a bullish ADX/DMI filter. Conversely, a "Short" signal occurs when both SuperTrends are bearish and confirmed by the ADX/DMI filter.
  • Timeframe Synergy: By default, the script looks at higher timeframes (e.g., 8-hour and Daily) to filter out noise on lower-interval charts.
  • Filtering: Users can toggle the ADX filter to ensure trades are only taken during periods of significant trend strength (ADX > 20), avoiding choppy sideways markets.
  • Customization: The "Trade Direction" setting allows traders to restrict the strategy to only "Long" or "Short" trades to align with an overall macro bias.

Details

The strategy employs several advanced concepts to enhance the standard SuperTrend:

  • KNN Algorithm: The script stores historical SuperTrend values and uses the K-Nearest Neighbors algorithm to classify the current market state. By looking at 'k' similar historical data points, it predicts whether the current price action is likely to stay above or below the SuperTrend line.
  • Multi-Timeframe (MTF) Logic: It calculates two separate SuperTrends from user-defined higher timeframes. This ensures that the local trade direction is supported by broader market structure.
  • Weighted Volatility: Instead of standard ATR, the SuperTrend source can be customized with various moving averages (SMA, EMA, WMA, RMA, VWMA) to change how the indicator reacts to volatility and volume.
  • Trend Strength Filter: The ADX and DMI (Directional Movement Index) calculations are performed on a higher timeframe to provide a "macro" filter for trend presence.

Settings

AI Settings

  • Neighbors (K): Determines the number of historical neighbors the KNN algorithm considers.
  • Data: The number of historical data points used for the KNN classification model.

AI Trend

  • Price Trend / Prediction Trend: Lengths for the weighted moving averages used to smooth price and SuperTrend data before processing by the AI.

Super Trend Settings

  • Higher TF 1 & 2: Sets the two external timeframes for the dual SuperTrend analysis.
  • Moving Average Source: Chooses the type of MA (e.g., WMA, VWMA) used in the SuperTrend core.
  • Length / Factor: Standard SuperTrend parameters controlling sensitivity and ATR multiplier.

ADX and DMI Settings

  • ADX Length: The period used to calculate the Average Directional Index.
  • ADX Time Frame: The timeframe used for the trend strength calculation.
  • Use ADX and DMI Filter?: Toggles whether trend strength must be confirmed before entering a trade.

FAQ

How do I interpret the colors on the chart?

The SuperTrend lines change color based on the AI's classification: bullish colors indicate the KNN algorithm predicts an uptrend, while bearish colors indicate a predicted downtrend.

Can I use this for scalping or swing trading?

Yes, the strategy is versatile. By adjusting the "Higher Time Frame" settings and the "Data" parameters in the AI section, you can tune the strategy for fast scalping or long-term swing trading.

How do I get access to Multi-TF AI-Enhanced SuperTrend with ADX Filter - Strategy?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.