Overview
This strategy is a long-only trading system based on Renko charts combined with a time filtering mechanism designed for specific trading sessions. The strategy utilizes the Average True Range (ATR) to dynamically adjust the brick size, identifying uptrends by tracking bricks formed from price movements, and executing long trades only within specified trading hours. The core concept lies in using Renko charts to filter market noise, capture sustained price movements, while avoiding inactive market periods to improve trading efficiency and capital safety.
Strategy Principles
The strategy operates based on the following core principles:
-
Renko Brick Construction: The system determines brick size through two methods - fixed value or ATR-based dynamic adjustment. In ATR mode, the brick size equals the ATR value over a specific period (default 5) multiplied by a factor (default 1.0), allowing the brick size to adaptively adjust according to market volatility.
-
Direction Determination Logic: The strategy tracks price movements, forming an up-brick when the price rises above the previous brick's closing price by more than the brick size; forming a down-brick when it falls by more than the brick size; and triggering a trend reversal when price movement exceeds twice the brick size.
-
Trade Signal Generation: A buy signal is generated when the brick direction changes from undefined or down to up; a sell signal is generated when the brick direction changes from undefined or up to down.
-
Time Filter: The strategy only executes trades within specified trading hours (default 4:35 to 14:30), which typically correspond to the active periods of major markets. When exiting the trading period, the system automatically closes positions to avoid overnight risk.
-
Long-Only Trading Mode: The strategy only executes long trades without short selling, suitable for markets with obvious bullish trends or where short selling is prohibited.
Strategy Advantages
Based on code analysis, this strategy offers the following significant advantages:
-
Noise Filtering: Renko charts naturally have the ability to filter market noise, as new bricks are only formed when price movements exceed a specific threshold, effectively avoiding overreactions to small price fluctuations.
-
Adaptive Adjustment: By dynamically adjusting brick size through ATR, the strategy can adapt to different market environments and volatility conditions, increasing brick size during high volatility periods and decreasing it during low volatility periods.
-
Time Risk Management: The time filter ensures that trades are only conducted during the most active and liquid market periods, avoiding nighttime and early market sessions where liquidity might be insufficient or volatility abnormal.
-
Clear Direction: The strategy focuses on capturing uptrends with a concise and clear logic, avoiding the frequent trading and commission costs associated with alternating between long and short positions.
-
Visual Assistance: The strategy provides buy/sell signal labels and brick high/low point visualization options, allowing traders to intuitively understand market dynamics and strategy performance.
-
Capital Management: The strategy adopts a quantitative trading model based on capital, automatically calculating position size according to initial capital, reducing the complexity of capital management.
Strategy Risks
Despite its reasonable design, the strategy still has the following potential risks:
-
Lagging Response: Renko charts are inherently lagging indicators, as new brick formation requires price to reach a specific movement amplitude, potentially causing delays in entry and exit timing. In rapidly reversing markets, this may result in missing optimal trading points.
-
Lack of Short-term Flexibility: The strategy only generates signals when new bricks are formed, potentially missing short-term profit opportunities, especially performing poorly in oscillating markets.
-
Unidirectional Limitation: A long-only strategy cannot profit in declining markets and may even continuously lose money. When the market is in a long-term downtrend, strategy effectiveness significantly decreases.
-
Time Filter Risk: Fixed trading session settings might miss important opportunities outside trading hours, while potentially causing unnecessary closing and re-entry operations at trading session boundaries.
-
Parameter Sensitivity: Strategy performance is highly dependent on brick size parameter settings, and inappropriate parameter choices may lead to excessive trading or missed opportunities.
Solutions:
- Add trend confirmation indicators such as moving averages or MACD to improve signal quality
- Introduce stop-loss mechanisms to control maximum risk per trade
- Consider adding short-selling functionality for bidirectional trading
- Optimize the time filter to adjust trading sessions based on different market characteristics
- Use parameter optimization testing to find the best parameter combinations
Strategy Optimization Directions
Based on code analysis, the strategy can be optimized in the following aspects:
-
Multi-indicator Fusion: Combine other technical indicators such as RSI, MACD, or moving average crossovers as confirmation signals to improve entry quality. This avoids false signals solely based on price patterns, especially in oscillating markets.
-
Dynamic Stop-Loss Mechanism: Introduce trailing stop-loss functionality, such as ATR-based dynamic stops, to protect profits while preserving upside potential. This is particularly important for capturing major trends.
-
Bidirectional Trading Extension: Add short trading capabilities to allow the strategy to profit in declining markets, improving the strategy's all-weather adaptability.
-
Intelligent Time Filtering: Upgrade fixed time filtering to dynamic time filtering based on market activity, for example by integrating volume analysis, trading actively during high liquidity periods and conservatively during low liquidity periods.
-
Multi-timeframe Analysis: Introduce multi-timeframe analysis, such as using higher timeframe trend direction as a trading filter condition, only trading when the larger trend direction is consistent.
-
Optimized Parameter Adaptivity: Develop parameter adaptive mechanisms to dynamically adjust ATR period and multipliers based on market conditions, allowing the strategy to better adapt to different market environments.
-
Risk Exposure Control: Add position sizing algorithms to dynamically adjust trading size based on market volatility and signal strength, controlling risk exposure.
These optimization directions aim to improve the strategy's robustness and adaptability, reducing losses in unfavorable market conditions while maximizing profit potential under favorable market conditions.
Conclusion
The Renko Time-Filtered Long-Only Trading Strategy is a trend-following system combining price momentum and time filtering. Through the Renko chart construction mechanism, the strategy effectively filters market noise, focusing on capturing sustained price movements; through the time filter, the strategy avoids inactive market periods, reducing overnight position risk.
The strategy's main advantages lie in its concise and clear trading logic, adaptive brick size design, and strict time management, making it particularly suitable for markets with high volatility but an overall upward trend. However, its unidirectional trading characteristics and lagging response are limitations that need attention.
By introducing multi-indicator confirmation, dynamic stop-loss mechanisms, bidirectional trading capabilities, and intelligent time filtering optimizations, this strategy has the potential to further enhance its performance across different market environments. For investors seeking robust trading who are willing to sacrifice some flexibility in exchange for clearer trading signals, this is a strategy framework worth considering.
/*backtest
start: 2025-06-22 00:00:00
end: 2025-07-22 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT","balance":200000}]
args: [["RunMode",1,358374]]
*/
//@version=5
strategy("Renko Long-Only Strategy with Time Filter", overlay=true, default_qty_value = 10)
- 1

