Best Supertrend CCI Multi Timeframe Trading Strategy
Overview
This strategy integrates the Supertrend indicator and the Commodity Channel Index (CCI) to realize a multi timeframe trend tracking and trade signal generation. The main idea is to use the CCI indicator to judge short-term trend direction while combining the Supertrend indicator to determine medium-to-long term trend direction. Trading signals are generated when the short-term and medium-to-long term trends align.
Strategy Logic
CCI Indicator for Short-term Trend
The CCI indicator can identify overbought and oversold scenarios. An upward crossover of the 0 line is a bullish signal while a downward one is a bearish signal. This strategy utilizes this feature to determine short-term trend direction.
cci_period = input(28, "CCI Period")
cci = cci(source, cci_period)
ML = input(0, "CCI Mid Line pivot")
The above code defines the CCI period and mid line position.
TrendUp := cci[1] > ML ? max(Up,TrendUp[1]) : Up
TrendDown := cci[1]< ML ? min(Dn,TrendDown[1]) : Dn
This code checks if cci crosses above/below the 0 line to update Supertrend's upper/lower band.
Supertrend for Medium-to-long Term Trend
The Supertrend indicator combines ATR with price to determine mid-to-long term trends. An upward penetration of the upper band signals an uptrend while a downward one signals downtrend.
Supertrend is calculated as:
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
Where Factor and Pd are adjustable parameters.
The Trend variable determines current Supertrend direction:
Trend := cci > ML ? 1: cci < ML ? -1: nz(Trend[1],1)
Integrate CCI and Supertrend
By integrating CCI and Supertrend, this strategy realizes multi timeframe trend judgment. CCI captures short-term swings while Supertrend focuses on bigger moves.
When directions agree, more reliable trading signals are generated.
isLong = st_trend == 1
isShort = st_trend == -1
Entries when short and medium-term align, exits when directions disagree.
Advantages
Multi Timeframe Judgment
Integrates short-term and mid-term indicators for more reliable signals.
Customizable Parameters
Supertrend's Factor and CCI Period can be adjusted for market conditions.
Simple and Clear
Simple logic and easy to understand, great for beginners.
Wide Applicability
Applicable to stocks, forex, crypto by parameter tuning.
Risks and Solutions
Price Whipsaw
Many false signals may occur when prices fluctuate violently. Increase Supertrend's Factor to lower frequency.
Lagging Strong Moves
Supertrend has some lagging. Combine momentum indicators to track accelerating trends.
No Stop Loss
Add stop loss based on ATR for risk control.
Optimization Directions
Market Correlation
Adjust parameters for different markets.
Momentum Combination
Combine with MACD, KDJ etc. to catch strong momentum moves.
Machine Learning
Utilize AI and ensemble methods to optimize parameters and rules.
Conclusion
This strategy successfully combines Supertrend and CCI for multi timeframe trend tracking. Simple logic, good reward potential and customizability. Can further improve via parameter tuning, stop loss, and machine learning to become a solid trading system.
- 1

