Double Supertrend Entry with ADX Filter and ATR Exits/Entries
Apr 16, 2023

The Double Supertrend Entry with ADX Filter and ATR Exits/Entries tool identifies trend-following opportunities by combining trend detection, strength filtering, and volatility-based risk management.
Usage
The tool generates entry signals when price action aligns with the trend direction as defined by the Supertrend indicators, provided the market strength meets the user-defined threshold.
- Long Entries: Occur when the price crosses above the Supertrend line while the ADX is above the threshold, the Random Walk Index (RWI) confirms upward momentum, and the price is above the EMA filter.
- Short Entries: Occur when the price crosses below the Supertrend line while the ADX is above the threshold, the RWI confirms downward momentum, and the price is below the EMA filter.
- Exits: The script automatically calculates Take Profit (TP) and Stop Loss (SL) levels using the Average True Range (ATR). Users can monitor these levels via on-chart labels and optional lines.
Details
This script integrates several technical concepts to ensure high-probability entries:
- Trend Filtering: Uses an Exponential Moving Average (EMA) and Supertrend to determine the primary market direction.
- Momentum & Strength: Utilizes the Average Directional Index (ADX) to ensure entries only occur during trending phases and the Random Walk Index (RWI) to distinguish between trend and random noise.
- Volatility-Based Risk: Leverages the ATR to dynamically adjust TP and SL levels according to current market volatility.
- Performance Tracking: Includes a built-in dashboard that calculates real-time statistics, including win rate and average profit/loss, based on the scripted exit logic.
Settings
Supertrend & EMA
- Supertrend 1 ATR Period: The lookback period for the ATR calculation within the Supertrend.
- ATR Multiplier: The factor applied to the ATR to determine the trend offset.
- EMA Filter Length: The period for the EMA used to filter the primary trend direction.
Filters
- ADX Threshold: The minimum ADX value required to validate a trend's strength.
- Random Walk Lookback: The period used for calculating the RWI.
- RWI Trigger Threshold: The value the RWI must exceed to confirm a non-random trend.
- Trading Window: Restricts signal generation to specific times of the day.
Exits & Visuals
- Profit Target/Stop Loss ATR Period: The lookback periods for calculating volatility-based exits.
- Profit Target/Stop Loss Multiplier: Multipliers that define the distance of TP and SL levels from the entry price.
- Show SL/TP Lines: Toggles the visibility of current trade exit levels on the chart.
FAQ
How do I access the Double Supertrend Entry with ADX Filter and ATR Exits/Entries?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the session times for the signals?
Yes, you can adjust the "Trading Window" setting using the HHMM-HHMM format to align the indicator with specific market sessions or hours.
What does the "Change ATR Calculation Method" setting do?
This allows you to switch between using a standard ATR or a smoothed ATR (SMA of ATR) for the Supertrend calculation, affecting how reactive the lines are to price spikes.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.