StockSharp.Strategies.0001_MA_CrossOver.py 5.0.1

Prefix Reserved
dotnet add package StockSharp.Strategies.0001_MA_CrossOver.py --version 5.0.1
                    
NuGet\Install-Package StockSharp.Strategies.0001_MA_CrossOver.py -Version 5.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StockSharp.Strategies.0001_MA_CrossOver.py" Version="5.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Strategies.0001_MA_CrossOver.py" Version="5.0.1" />
                    
Directory.Packages.props
<PackageReference Include="StockSharp.Strategies.0001_MA_CrossOver.py" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StockSharp.Strategies.0001_MA_CrossOver.py --version 5.0.1
                    
#r "nuget: StockSharp.Strategies.0001_MA_CrossOver.py, 5.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StockSharp.Strategies.0001_MA_CrossOver.py@5.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StockSharp.Strategies.0001_MA_CrossOver.py&version=5.0.1
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Strategies.0001_MA_CrossOver.py&version=5.0.1
                    
Install as a Cake Tool

HMA Seasonal Divergence Strategy (Python Version)

This strategy combines the Hull Moving Average (HMA) with seasonal open interest clustering to find divergences between price and market positioning. It assumes that when price temporarily moves against the direction of rising open interest, a trend continuation is likely. The system is designed to trade both long and short, using the HMA slope to gauge momentum and the seasonal open interest data to measure participation levels.

A trade setup occurs when the HMA changes relative to the previous bar while seasonal open interest confirms the move, but price prints in the opposite direction. This bullish or bearish divergence between price and positioning often signals the end of a short-term pullback within a larger trend. The strategy waits for these conditions before entering and places a volatility-based stop to manage risk.

Positions are closed when the HMA slope reverses, signifying that momentum has shifted. Because the stop level uses a multiple of the Average True Range (ATR), the risk adapts to market volatility. This helps prevent premature exits during periods of expansion and keeps losses contained when volatility contracts.

Details

  • Entry Criteria:
    • Long: HMA(t) > HMA(t-1) && OI_Cluster_Seasonal(t) > OI_Cluster_Seasonal(t-1) && Price(t) < Price(t-1) (bullish divergence).
    • Short: HMA(t) < HMA(t-1) && OI_Cluster_Seasonal(t) < OI_Cluster_Seasonal(t-1) && Price(t) > Price(t-1) (bearish divergence).
  • Long/Short: Both sides.
  • Exit Criteria:
    • Long: HMA(t) < HMA(t-1) (HMA begins falling).
    • Short: HMA(t) > HMA(t-1) (HMA begins rising).
  • Stops: Yes, stop-loss placed at N * ATR from entry.
  • Default Values:
    • HMA period = 9.
    • OI_Cluster_Seasonal = seasonal OI at cluster levels over five years.
    • N = 2 (stop-loss = 2 * ATR).
  • Filters:
    • Category: Trend following
    • Direction: Both
    • Indicators: Multiple
    • Stops: Yes
    • Complexity: Complex
    • Timeframe: Medium-term
    • Seasonality: Yes
    • Neural networks: Yes
    • Divergence: Yes
    • Risk level: High
There are no supported framework assets in this package.

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.

Version Downloads Last Updated
5.0.1 22 7/19/2025
5.0.0 19 7/19/2025