Skip to main content
Any Framework

Macd Cci Strategy (Python)

Published
Aug 7, 2025
1y ago
Total Downloads
1.3K
1,257

Install

dotnet add package StockSharp.Strategies.0161_MACD_CCI.py --version 5.0.1

No framework information available.

README

Macd Cci Strategy (Python Version)

Implementation of strategy - MACD + CCI. Buy when MACD is above Signal line and CCI is below -100 (oversold). Sell when MACD is below Signal line and CCI is above 100 (overbought).

Testing indicates an average annual return of about 70%. It performs best in the stocks market.

MACD swings highlight momentum shifts; CCI helps time pullback entries in that direction. Both long and short trades are possible.

Traders who blend momentum with oscillators may like this technique. Risk control uses an ATR stop.

Details

  • Entry Criteria:
    • Long: MACD > Signal && CCI < CciOversold
    • Short: MACD < Signal && CCI > CciOverbought
  • Long/Short: Both
  • Exit Criteria: MACD cross in opposite direction
  • Stops: Percent-based using StopLoss
  • Default Values:
    • FastPeriod = 12
    • SlowPeriod = 26
    • SignalPeriod = 9
    • CciPeriod = 20
    • CciOversold = -100m
    • CciOverbought = 100m
    • StopLoss = new Unit(2, UnitTypes.Percent)
    • CandleType = TimeSpan.FromMinutes(5).TimeFrame()
  • Filters:
    • Category: Mean reversion
    • Direction: Both
    • Indicators: MACD, CCI
    • Stops: Yes
    • Complexity: Intermediate
    • Timeframe: Mid-term
    • Seasonality: No
    • Neural Networks: No
    • Divergence: No
    • Risk Level: Medium

Changes from Previous Version

No structural changes between v5.0.0 and v5.0.1.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.