PROTECTED SOURCE SCRIPT
SwingMaster - HEKATRADER

SwingMaster CCI Indicator - Technical Overview
Indicator Components
The SwingMaster CCI is a dual-line momentum indicator combining:
Primary Signal Line (Red): 55-period Commodity Channel Index calculated on closing prices
Measures price deviation from its statistical mean
Unbounded oscillator tracking momentum strength
Responds to sustained price movements while filtering minor fluctuations
Trend Filter Line (Blue): 100-period Simple Moving Average applied to CCI values with 10-bar forward offset
Smooths CCI volatility for clearer trend identification
Forward shift provides visual trend projection
Acts as dynamic support/resistance for momentum
Reference Levels: 0, ±100, ±200 zones for momentum classification
Technical Calculation
CCI Formula:
CCI = (Typical Price - SMA) / (0.015 × Mean Deviation)
Where Typical Price = (High + Low + Close) / 3
The 55-period setting reduces whipsaw signals compared to standard 14-20 period CCI, making it suitable for swing trading and position trading on H1-H4 timeframes.
Entry Signals
Long Entry Conditions:
Red CCI line crosses above blue MA line → Momentum shift confirmation
Cross occurs above +100 level → Strong bullish momentum (preferred)
Cross between 0 and +100 → Moderate bullish setup
Avoid crosses below -100 → Weak recovery signal
Short Entry Conditions:
Red CCI line crosses below blue MA line → Bearish momentum confirmation
Cross occurs below -100 level → Strong bearish momentum (preferred)
Cross between 0 and -100 → Moderate bearish setup
Avoid crosses above +100 → Weak reversal signal
Exit Strategy
Primary Exit:
Reverse crossover (red crosses opposite direction through blue line)
Provides trend-following exits maximizing trend capture
Alternative Exits:
CCI reaches extreme levels (±200) then reverses → Potential exhaustion
Price reaches predetermined profit target based on ATR multiples
Hard stop-loss placement at recent swing high/low
Optimal Market Conditions
Best Performance:
Trending markets with sustained directional movement
Volatile instruments (EUR/USD etc..)
H1-H4 timeframes for swing positions
Daily timeframe for position trading
Avoid:
Low-volatility ranging conditions → generates excessive false signals
M5-M15 timeframes → 55-period too slow for scalping
Major news releases → extreme CCI spikes invalidate signals
Risk Management Framework
Position Sizing:
Risk 1-2% account equity per trade
Calculate position size based on stop-loss distance
Stop Loss Placement:
Below/above recent swing point (conservative)
1.5-2× ATR from entry (volatility-adjusted)
Typical range: 35-80 pips depending on instrument
Take Profit Targets:
Minimum 1:2 risk-reward ratio
Trail stop using blue MA line as dynamic support/resistance
Scale out at +100/-100 CCI levels, let remainder run
Advanced Applications
Divergence Trading:
Price makes new high but CCI fails to → bearish divergence
Price makes new low but CCI holds higher → bullish divergence
Divergences near ±100 levels carry higher probability
Multi-Timeframe Confirmation:
H4 CCI for trend direction filter
H1 CCI for precise entry timing
Enter only when both timeframes align
Confluence Zones:
Combine CCI crossover with key support/resistance levels
Use alongside moving average price structure (50/200 EMA)
Volume confirmation enhances signal reliability
Performance Expectations
Win Rate: Typically 45-55% (trend-following characteristic)
Profit Factor: Target 1.5+ with proper risk management
Average Trade Duration: 12-48 hours (H1-H4 timeframes)
Drawdown: Expect 15-25% during ranging periods
Key Advantages
Reduced noise through extended periods (55/100)
Clear visual signals requiring minimal interpretation
Effective in strong trending environments
Combines momentum measurement with trend filtering
Forward offset provides anticipatory trend projection
Limitations
Lagging nature generates late entries during trend initiation
Performs poorly in choppy, sideways markets
10-bar shift can create visual bias in manual backtesting
Requires strict discipline during consecutive losses
Indicator Components
The SwingMaster CCI is a dual-line momentum indicator combining:
Primary Signal Line (Red): 55-period Commodity Channel Index calculated on closing prices
Measures price deviation from its statistical mean
Unbounded oscillator tracking momentum strength
Responds to sustained price movements while filtering minor fluctuations
Trend Filter Line (Blue): 100-period Simple Moving Average applied to CCI values with 10-bar forward offset
Smooths CCI volatility for clearer trend identification
Forward shift provides visual trend projection
Acts as dynamic support/resistance for momentum
Reference Levels: 0, ±100, ±200 zones for momentum classification
Technical Calculation
CCI Formula:
CCI = (Typical Price - SMA) / (0.015 × Mean Deviation)
Where Typical Price = (High + Low + Close) / 3
The 55-period setting reduces whipsaw signals compared to standard 14-20 period CCI, making it suitable for swing trading and position trading on H1-H4 timeframes.
Entry Signals
Long Entry Conditions:
Red CCI line crosses above blue MA line → Momentum shift confirmation
Cross occurs above +100 level → Strong bullish momentum (preferred)
Cross between 0 and +100 → Moderate bullish setup
Avoid crosses below -100 → Weak recovery signal
Short Entry Conditions:
Red CCI line crosses below blue MA line → Bearish momentum confirmation
Cross occurs below -100 level → Strong bearish momentum (preferred)
Cross between 0 and -100 → Moderate bearish setup
Avoid crosses above +100 → Weak reversal signal
Exit Strategy
Primary Exit:
Reverse crossover (red crosses opposite direction through blue line)
Provides trend-following exits maximizing trend capture
Alternative Exits:
CCI reaches extreme levels (±200) then reverses → Potential exhaustion
Price reaches predetermined profit target based on ATR multiples
Hard stop-loss placement at recent swing high/low
Optimal Market Conditions
Best Performance:
Trending markets with sustained directional movement
Volatile instruments (EUR/USD etc..)
H1-H4 timeframes for swing positions
Daily timeframe for position trading
Avoid:
Low-volatility ranging conditions → generates excessive false signals
M5-M15 timeframes → 55-period too slow for scalping
Major news releases → extreme CCI spikes invalidate signals
Risk Management Framework
Position Sizing:
Risk 1-2% account equity per trade
Calculate position size based on stop-loss distance
Stop Loss Placement:
Below/above recent swing point (conservative)
1.5-2× ATR from entry (volatility-adjusted)
Typical range: 35-80 pips depending on instrument
Take Profit Targets:
Minimum 1:2 risk-reward ratio
Trail stop using blue MA line as dynamic support/resistance
Scale out at +100/-100 CCI levels, let remainder run
Advanced Applications
Divergence Trading:
Price makes new high but CCI fails to → bearish divergence
Price makes new low but CCI holds higher → bullish divergence
Divergences near ±100 levels carry higher probability
Multi-Timeframe Confirmation:
H4 CCI for trend direction filter
H1 CCI for precise entry timing
Enter only when both timeframes align
Confluence Zones:
Combine CCI crossover with key support/resistance levels
Use alongside moving average price structure (50/200 EMA)
Volume confirmation enhances signal reliability
Performance Expectations
Win Rate: Typically 45-55% (trend-following characteristic)
Profit Factor: Target 1.5+ with proper risk management
Average Trade Duration: 12-48 hours (H1-H4 timeframes)
Drawdown: Expect 15-25% during ranging periods
Key Advantages
Reduced noise through extended periods (55/100)
Clear visual signals requiring minimal interpretation
Effective in strong trending environments
Combines momentum measurement with trend filtering
Forward offset provides anticipatory trend projection
Limitations
Lagging nature generates late entries during trend initiation
Performs poorly in choppy, sideways markets
10-bar shift can create visual bias in manual backtesting
Requires strict discipline during consecutive losses
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.