StockSharp.Strategies.0452_Ttm_Squeeze.py 5.0.0

Prefix Reserved
dotnet add package StockSharp.Strategies.0452_Ttm_Squeeze.py --version 5.0.0
                    
NuGet\Install-Package StockSharp.Strategies.0452_Ttm_Squeeze.py -Version 5.0.0
                    
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.0452_Ttm_Squeeze.py" Version="5.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Strategies.0452_Ttm_Squeeze.py" Version="5.0.0" />
                    
Directory.Packages.props
<PackageReference Include="StockSharp.Strategies.0452_Ttm_Squeeze.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.0452_Ttm_Squeeze.py --version 5.0.0
                    
#r "nuget: StockSharp.Strategies.0452_Ttm_Squeeze.py, 5.0.0"
                    
#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.0452_Ttm_Squeeze.py@5.0.0
                    
#: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.0452_Ttm_Squeeze.py&version=5.0.0
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Strategies.0452_Ttm_Squeeze.py&version=5.0.0
                    
Install as a Cake Tool

TTM Squeeze Strategy (Python Version)

The TTM Squeeze strategy looks for periods of price compression when Bollinger Bands contract inside Keltner Channels. This "squeeze" signals a potential volatility expansion. During the squeeze the strategy monitors a linear regression momentum oscillator and RSI to gauge direction. When the squeeze releases and momentum turns, positions are taken in the direction of the move.

The method seeks explosive breakouts from quiet ranges. Trades are filtered so that long setups require momentum rising from below zero with RSI above 30, while short setups need momentum falling from positive territory with RSI below 70. An optional take-profit parameter can automatically close trades at a predefined gain.

Details

  • Entry Criteria:
    • Squeeze off (Bollinger Bands outside Keltner Channels).
    • Long: Momentum < 0 and rising, RSI > 30.
    • Short: Momentum > 0 and falling, RSI < 70.
  • Long/Short: Both sides.
  • Exit Criteria:
    • Opposite signal or take-profit if enabled.
  • Stops: None by default, optional take-profit.
  • Default Values:
    • SqueezeLength = 20
    • RsiLength = 14
    • UseTP = False
    • TpPercent = 1.2
  • Filters:
    • Category: Volatility breakout
    • Direction: Both
    • Indicators: Bollinger Bands, Keltner Channels, RSI, Linear Regression
    • Stops: Optional
    • Complexity: Medium
    • Timeframe: Any
    • Seasonality: No
    • Neural networks: No
    • Divergence: No
    • Risk level: Medium
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.0 237 8/7/2025