This strategy aims to capitalize on trending markets by combining the Average Directional Index (ADX), Commodity Channel Index (CCI), and a customizable Moving Average (MA). It's designed for traders seeking a balanced approach to both long (buy) and short (sell) opportunities. Special thanks to the creators of the ADX and CCI indicators for their invaluable contributions to technical analysis.
Strategy Concept
The core idea is to identify strong trends with the ADX, confirm potential entry points with the CCI, and use the MA to filter trades in the direction of the broader trend. This approach seeks to avoid entering positions during periods of consolidation or when the trend is weak.
Indicator Logic
ADX (Average Directional Index): The ADX measures the strength of a trend, regardless of its direction. A value above the customizable adx_threshold (default 20) signals a strong trend, making it a prime environment for this strategy. CCI (Commodity Channel Index): The CCI is a momentum oscillator that helps identify overbought (above 100) and oversold (below -100) conditions. We use CCI crossovers to time entries in the direction of the prevailing trend. MA (Moving Average): The MA acts as a trend filter, ensuring we only enter trades aligned with the overall market direction. You have flexibility in choosing the MA type (SMA, EMA, etc.) and its length to suit your trading style and timeframe. Entry Conditions
Long (Buy): ADX is above the adx_threshold. CCI crosses above 100. Price is above the chosen Moving Average (if MA trend filtering is enabled). Short (Sell): ADX is above the adx_threshold. CCI crosses below -100. Price is below the chosen Moving Average (if MA trend filtering is enabled). Exit Conditions
Stop Loss (SL): Each position has a customizable stop-loss percentage to manage risk. The default setting is 1%. Take Profit (TP): Each position has a customizable take-profit percentage to secure gains. The default setting is 5%. MA-Based Risk Management (Optional): This feature allows for early exits if the price closes against the MA trend for a specified number of candles. The default setting is 2 candles. Default Settings
CCI Period: 15 ADX Length: 10 ADX Threshold: 20 MA Type: HMA MA Length: 200 MA Source: Close Commission Fee: $0.0
A commission fee is not added, add your trading/platform commission for realistic trading costs.
Backtest Results
The strategy has been backtested on [specify timeframe(s) and market(s)] with the default settings and a starting capital of $1000, with 0.0% commission fee. It shows promising results.
Disclaimer: Backtesting is hypothetical and does not guarantee future performance. Important Considerations:
Customization: The strategy offers extensive customization to tailor it to your preferences. Experiment with different parameters and settings to find what works best for your trading style. Risk Management: Always use proper risk management techniques, including position sizing and stop losses, to protect your capital.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.