Multi-Bar Direction Strategy
Overview
The Multi-Bar Direction strategy identifies trend reversal signals by calculating the probability of multiple bars moving in the same direction. It is mainly used for medium-term trading.
Strategy Logic
The strategy first sets the start and end time for historical data extraction. The trading hours are configured to identify qualified candlesticks. It calculates the probability of consecutive ups or downs within 2 to 7 candlesticks. Trading signals are generated when the up or down ratio exceeds a threshold.
For example, if the probability of downtrend in 3 candlesticks is lower than 50%, the current 3 candlesticks meet the condition and a buy signal is generated. The parameters from 2 to 7 bars can be configured.
The specific logic is as follows:
-
Set backtest time range, including start date, end date, trading hours.
-
Count the number of same direction ups or downs within 2 to 7 candlesticks.
-
Calculate the probability of continuation of up or down between adjacent candlesticks.
-
If the probability is lower than 50%, the current candlesticks match the reversal pattern.
-
Generate buy or sell signals within trading hours.
-
Backtest to validate the strategy.
Advantages
-
Avoid false signals by considering multiple candlesticks probabilities.
-
Customizable bar count to identify reversal signals across different timeframes.
-
Clear trading hours avoid untimely signals.
-
Intuitive statistics display for performance evaluation.
-
Many optimizable parameters suitable for different markets.
Risks
-
Bar count cannot fully determine trend reversal points. There are misjudgements.
-
Long statistics duration may miss short-term trading opportunities.
-
Static threshold is impacted by market volatility. Dynamic adjustment is needed.
-
Backtest period selection may cause overfitting.
Possible solutions:
-
Optimize bar count for different timeframes.
-
Incorporate other indicators.
-
Adopt dynamic thresholds based on market volatility.
-
Expand backtest period and run multiple backtests.
Optimization Directions
The strategy can be optimized in the following aspects:
-
Optimize bar count from 2 to 10 and select the optimal parameter.
-
Test reversal threshold from 40% to 60% considering market changes.
-
Add stop loss after signal generation to limit risk.
-
Incorporate other indicators like RSI to validate signals.
-
Add more products like futures and forex for parameter testing.
-
Incremental parameter tuning to find optimal combinations.
-
Apply machine learning models to find optimal parameters automatically.
Conclusion
The Multi-Bar Direction strategy identifies potential reversal signals by statistically analyzing candlestick probabilities. But the performance depends on parameter tuning based on sufficient optimizations. In addition, reversal signals have misjudgement risks and need validation. Overall, this is a simple and effective statistical strategy worthwhile for further research and optimization.
- 1

