StockSharp.Strategies.0421_Ema_Sma_Rsi 5.0.0

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

EMA/SMA + RSI Crossover Strategy (C# Version)

This strategy tracks three exponential moving averages (fast, medium, and slow) along with an RSI filter to participate in emerging trends. A trade is triggered when the fast average crosses the medium one in the direction of the prevailing slow average, indicating that momentum is accelerating. Only candles that close in the direction of the crossover are considered to avoid whipsaws.

A protective exit can optionally close positions after a user-defined number of bars if they remain profitable. The RSI acts as an overbought/oversold guard to exit when momentum becomes stretched.

Backtests show the technique works best on liquid crypto pairs during trending phases where moving averages offer clear separation.

Details

  • Entry Criteria:
    • Long: EMA_fast > EMA_medium and EMA_fast(t-1) <= EMA_medium(t-1) and Close > EMA_slow and Close > Open
    • Short: EMA_fast < EMA_medium and EMA_fast(t-1) >= EMA_medium(t-1) and Close < EMA_slow and Close < Open
  • Long/Short: Both sides.
  • Exit Criteria:
    • Long: RSI > 70 or X bars in profit and Close > entry
    • Short: RSI < 30 or X bars in profit and Close < entry
  • Stops: None.
  • Default Values:
    • EMA_fast = 10
    • EMA_medium = 20
    • EMA_slow = 100
    • RSI_length = 14
    • X bars = 24
  • Filters:
    • Category: Trend following
    • Direction: Both
    • Indicators: EMA, RSI
    • Stops: Optional time-based
    • Complexity: Medium
    • Timeframe: Short-term
    • 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 224 8/7/2025

fixes