StockSharp.Strategies.0079_Trendline_Bounce.py 5.0.0

Prefix Reserved
dotnet add package StockSharp.Strategies.0079_Trendline_Bounce.py --version 5.0.0
                    
NuGet\Install-Package StockSharp.Strategies.0079_Trendline_Bounce.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.0079_Trendline_Bounce.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.0079_Trendline_Bounce.py" Version="5.0.0" />
                    
Directory.Packages.props
<PackageReference Include="StockSharp.Strategies.0079_Trendline_Bounce.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.0079_Trendline_Bounce.py --version 5.0.0
                    
#r "nuget: StockSharp.Strategies.0079_Trendline_Bounce.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.0079_Trendline_Bounce.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.0079_Trendline_Bounce.py&version=5.0.0
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Strategies.0079_Trendline_Bounce.py&version=5.0.0
                    
Install as a Cake Tool

Trendline Bounce Strategy (Python Version)

Markets often respect trendlines drawn across prior swing highs or lows. This strategy automatically fits regression lines to recent price action and looks for candles that bounce from those lines in the direction of the dominant trend.

Recent candles are stored to calculate upward or downward sloping support and resistance lines. When price nears a trendline and a candle confirms the bounce while staying on the correct side of a moving average, the system enters a trade. The stop is set using a percentage of price and an exit occurs on a cross of the moving average.

By only trading in the prevailing direction and waiting for a clear reaction at support or resistance, the method attempts to capture continuation moves without chasing breakouts.

Details

  • Entry Criteria: Price touches calculated trendline and candle closes in trend direction above/below MA.
  • Long/Short: Both.
  • Exit Criteria: Price crossing moving average or stop-loss.
  • Stops: Yes, percentage based.
  • Default Values:
    • TrendlinePeriod = 20
    • MAPeriod = 20
    • BounceThresholdPercent = 0.5
    • CandleType = 5 minute
    • StopLossPercent = 2
  • Filters:
    • Category: Trend following
    • Direction: Both
    • Indicators: MA, Trendlines
    • Stops: Yes
    • Complexity: Advanced
    • Timeframe: Intraday
    • 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 18 7/19/2025