StockSharp.Strategies.0068_CCI_Divergence.py
5.0.1
Prefix Reserved
dotnet add package StockSharp.Strategies.0068_CCI_Divergence.py --version 5.0.1
NuGet\Install-Package StockSharp.Strategies.0068_CCI_Divergence.py -Version 5.0.1
<PackageReference Include="StockSharp.Strategies.0068_CCI_Divergence.py" Version="5.0.1" />
<PackageVersion Include="StockSharp.Strategies.0068_CCI_Divergence.py" Version="5.0.1" />
<PackageReference Include="StockSharp.Strategies.0068_CCI_Divergence.py" />
paket add StockSharp.Strategies.0068_CCI_Divergence.py --version 5.0.1
#r "nuget: StockSharp.Strategies.0068_CCI_Divergence.py, 5.0.1"
#:package StockSharp.Strategies.0068_CCI_Divergence.py@5.0.1
#addin nuget:?package=StockSharp.Strategies.0068_CCI_Divergence.py&version=5.0.1
#tool nuget:?package=StockSharp.Strategies.0068_CCI_Divergence.py&version=5.0.1
CCI Divergence Strategy (Python Version)
Commodity Channel Index divergences can foreshadow trend reversals when price moves in the opposite direction of the indicator. This strategy compares swing highs and lows in price to those of the CCI to identify hidden strength or weakness.
Testing indicates an average annual return of about 91%. It performs best in the stocks market.
On each candle the system updates recent price and CCI values, flagging bullish divergence when price makes a new low while CCI forms a higher low. Bearish divergence is the opposite. When a divergence aligns with oversold or overbought levels, a trade is opened with a volatility stop.
Exits occur when the CCI crosses back through the zero line, signaling the impulse has played out. Because divergences can persist, the rules also reset after a fixed number of bars to avoid stale signals.
Details
- Entry Criteria: Price/CCI divergence with CCI below -100 for longs or above +100 for shorts.
- Long/Short: Both.
- Exit Criteria: CCI crossing zero or stop-loss.
- Stops: Yes, percentage based.
- Default Values:
CciPeriod
= 20DivergencePeriod
= 5OverboughtLevel
= 100OversoldLevel
= -100CandleType
= 15 minuteStopLossPercent
= 2
- Filters:
- Category: Divergence
- Direction: Both
- Indicators: CCI
- Stops: Yes
- Complexity: Advanced
- Timeframe: Intraday
- Seasonality: No
- Neural networks: No
- Divergence: Yes
- Risk level: Medium
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
refactor: move state reset to OnReseted