logo
Developers

Twin Range Filter Algo

Script from: TradingViewSwingVolatilityTrend followingMomentum

The Twin Range Filter Algo combines volatility and range conditions to trigger trades. Incorporating ATR with 32 and 64 periods, a trade is signaled when the shorter-term ATR is less than the longer-term ATR. This method is augmented by manually set target and stop-loss levels in ticks, along with a candle-based time stop-loss to exit positions. Originally effective for 15m and 1h BTCUSD time frames, it requires individual market assessment to optimize for other instruments.

SAND / TetherUS (SANDUSDT)

+ Twin Range Filter Algo

@ Daily

1.75

Risk Reward

206.57 %

Total ROI

52

Total Trades

BONK / TetherUS (BONKUSDT)

+ Twin Range Filter Algo

@ 4 h

1.53

Risk Reward

247.40 %

Total ROI

177

Total Trades

RUNE / TetherUS (RUNEUSDT)

+ Twin Range Filter Algo

@ Daily

1.52

Risk Reward

112.85 %

Total ROI

41

Total Trades

AR / TetherUS (ARUSDT)

+ Twin Range Filter Algo

@ Daily

1.48

Risk Reward

116.34 %

Total ROI

44

Total Trades

AAVE / TetherUS (AAVEUSDT)

+ Twin Range Filter Algo

@ 4 h

1.42

Risk Reward

314.73 %

Total ROI

364

Total Trades

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ Daily

4.27

Risk Reward

87.26 %

Total ROI

16

Total Trades

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ 1 h

3.97

Risk Reward

87.27 %

Total ROI

16

Total Trades

Lumentum Holdings Inc. (LITE)

+ Twin Range Filter Algo

@ Daily

2.36

Risk Reward

174.97 %

Total ROI

56

Total Trades

Pinterest, Inc. (PINS)

+ Twin Range Filter Algo

@ 2 h

1.69

Risk Reward

246.03 %

Total ROI

215

Total Trades

Alpine Immune Sciences, Inc. (ALPN)

+ Twin Range Filter Algo

@ 4 h

1.65

Risk Reward

288.69 %

Total ROI

156

Total Trades

Bank of America Corporation (BAC)

+ Twin Range Filter Algo

@ 2 h

1.64

Risk Reward

386.42 %

Total ROI

635

Total Trades

American Airlines Group, Inc. (AAL)

+ Twin Range Filter Algo

@ 2 h

1.60

Risk Reward

579.74 %

Total ROI

611

Total Trades
Create your account for free to see all 206+ backtests

Access filters, details, best timeframes, explore 100K+ backtests and more

Active Trades

Create your account to see on which symbols Twin Range Filter Algo is currently trading on.

Guide

How does the Twin Range Filter Algo strategy work ?

The Twin Range Filter Algo is a strategy that harnesses different volatility ranges to generate trading signals, with an additional ATR condition improving its efficacy. It employs two smoothed average ranges derived from the source price, with one moving faster than the other due to different periods and multipliers. The heart of the system is a range filter mechanism that compares the current price with the smoothed average and adapts to recent price movement to create a filter value.

Trade signals are generated based on the direction and persistence of the price crossing this filter value. A long condition is established when the price is above the filter and increasing, or if the price is above the filter but declining after a period of upward movement. Conversely, a short condition is set when the price is below the filter and decreasing, or if it's below the filter yet rising following a downward motion.

Crucially, the modified version of this strategy introduces an ATR condition: a trade is only executed if the short-range ATR (32 periods) is smaller than the long-term ATR (64 periods), implying less immediate volatility and potentially more stable trends.

Manually set targets and stop-losses, expressed in ticks, aim to establish clear exit criteria, while a time-based stop exits a position after a defined number of candles, regardless of the market's direction. Taken together, these conditions attempt to capitalize on volatility trends while providing structured risk management.

How to use the Twin Range Filter Algo strategy ?

This trading strategy uses twin smooth range filters to generate signals for long and short entries based on the direction of the trend defined by a filtered price relative to its previous value and a combination of average true range indicators for additional conditions.

To trade this strategy manually on TradingView:

  • Set up two Moving Averages with periods 27 (Fast) and 55 (Slow).
  • Calculate the Smooth Average Range for both (SAR), multiple by 1.6 for Fast and 2 for Slow and average them.
  • Create High and Low Bands by adding and subtracting the SAR from the filtered price.
  • Define long conditions as the price being above the filtered price and either increasing or decreasing but still above the previous filtered price with a positive upward streak.
  • Define short conditions as the price being below the filtered price and either decreasing or increasing but still below the previous filtered price with a positive downward streak.
  • Use the additional ATR conditions to filter out entries where short-term volatility is greater than long-term volatility (use two separate ATR indicators with periods set to the values of l2 and l3 from the script).
  • Determine stop losses and take profit levels based on Low, High, Close prices in combination with ATR and ultimately set them according to the given input parameters as stop targets in the script.
  • Lastly, close the positions based on time stop criteria mentioned in the script or upon hitting the stop loss/take profit levels.

How to optimize the Twin Range Filter Algo trading strategy ?

To enhance the Twin Range Filter Algo strategy for manual trading on TradingView, consider the following plan:

  • Filter Fine-Tuning: Assess the price action context before executing trades signaled by the smooth range filters. Incorporate additional technical indicators like RSI or MACD to confirm trend strength and potential reversals. This helps avoid false entries during choppy or ranging markets.
  • ATR Period Adjustments: Experiment with different period settings for the ATR to adapt to varying market conditions. A shorter ATR period can be more responsive to recent volatility, while a longer period smooths out spikes and may better reflect the overall trend.
  • Multiple Time Frame Analysis: Utilize higher time frame charts to determine the overall market trend and then use the strategy on lower time frames to signal entries that align with the higher time frame trend. This ensures trades are in sync with larger market movements.
  • Dynamic Stop Loss and Take Profit: Instead of fixed tick values, implement dynamic stop loss and take profit levels based on the current volatility using ATR. For example, a stop loss could be set to a multiple of the current ATR, and take profit could be a larger multiple of ATR away from the entry price.
  • Risk Management: Apply position sizing that reflects the current market volatility and the distance to your stop loss. As volatility increases, position sizes can be reduced to maintain a consistent risk level per trade.
  • Economic Calendar Consideration: Be cautious around major economic news releases that could dramatically increase volatility and lead to slippage. Consider closing open positions or reducing position size ahead of such events.
  • Manual Trailing Stop: Once a trade has moved favorably, manually move the stop loss to lock in profits. The trailing stop can be guided by the smooth range filter line or key support and resistance levels.
  • Continuous Backtesting: Periodically backtest the strategy with the adjustments to identify the optimal settings for current market conditions. Keep a journal of these backtests to understand the impact of each change made.

By implementing these improvements to the Twin Range Filter Algo, you can manually trade with a strategy that is more adaptive to changing market environments and is tailored to your risk tolerance and trading style.

For which kind of traders is the Twin Range Filter Algo strategy suitable ?

This strategy is well-suited for traders who favor technical analysis and are comfortable with active market engagement. Specifically, it caters to:

  • Day traders: With the use of 15m to 1h time frames, this strategy is designed for those who can trade actively during the day and manage trades within short periods.
  • Traders with a focus on volatility: Since the strategy relies on ATR comparisons for entry signals, it is ideal for traders who specialize in volatility-based trading styles.
  • Trend followers: The method incorporates trend-identifying elements, making it an excellent option for traders who look to capitalize on momentum and trends in the market.

It demands consistent market analysis and quick decision-making, thus best serving traders who can dedicate time to monitor the markets and make timely adjustments to their trades.

Key Takeaways of Twin Range Filter Algo

  • Strategy essence: Utilizes twin smooth average ranges and ATR indicators to identify entries based on trend direction and volatility.
  • Working mechanism: Generates signals when price crosses filtered values with confirmation from short-term versus long-term volatility levels.
  • Trading approach: Best applied in active trading, particularly on short time frames like 15m to 1h for day trading.
  • Automation and alerts: Can be automated within TradingView, with the option to use alerts for trade entries/exits based on conditions.
  • Manual trading: Involves additional analysis with technical indicators, employing dynamic stops and a multi-timeframe approach for confirmation.
  • Optimization: Requires regular backtesting and adjustment of ATR periods and smooth range filter parameters to refine signals.
  • Risk management: Dynamic position sizing based on volatility and market conditions to manage exposure.
  • Trader suitability: Suits technical traders, momentum followers, and those adept at volatility analysis and swift decision-making.
Explore the best Trading & TradingView strategies

Stop trading blindly. Explore the best strategies among 100K+ backtests and improve your trading skills with data.

Start for free