Kostinay

ADX + CCI + MA - Uncle Sam

Strategy Name: ADX + CCI + MA - Uncle Sam

Overview

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 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 ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?