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.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?