Skip to main content
Any Framework

Ma Williams R Strategy (C#)

Published
Aug 7, 2025
1y ago
Total Downloads
1.8K
1,806

Install

dotnet add package StockSharp.Strategies.0164_MA_Williams_R --version 5.0.2

No framework information available.

README

Ma Williams R Strategy (C# Version)

Implementation of strategy - MA + Williams %R. Buy when price is above MA and Williams %R is below -80 (oversold). Sell when price is below MA and Williams %R is above -20 (overbought).

Testing indicates an average annual return of about 79%. It performs best in the stocks market.

The moving average shows the prevailing trend direction. Williams %R looks for overbought or oversold points relative to that trend.

Fits swing traders waiting for pullbacks toward the average. Stop-loss distance comes from ATR.

Details

  • Entry Criteria:
    • Long: Close > MA && WilliamsR < WilliamsROversold
    • Short: Close < MA && WilliamsR > WilliamsROverbought
  • Long/Short: Both
  • Exit Criteria:
    • Williams %R returns to middle
  • Stops: Percent-based using StopLoss
  • Default Values:
    • MaPeriod = 20
    • MaType = MovingAverageTypeEnum.Simple
    • WilliamsRPeriod = 14
    • WilliamsROversold = -80m
    • WilliamsROverbought = -20m
    • StopLoss = new Unit(2, UnitTypes.Percent)
    • CandleType = TimeSpan.FromMinutes(5).TimeFrame()
  • Filters:
    • Category: Mean reversion
    • Direction: Both
    • Indicators: Moving Average, Williams %R, R
    • Stops: Yes
    • Complexity: Intermediate
    • Timeframe: Mid-term
    • Seasonality: No
    • Neural Networks: No
    • Divergence: No
    • Risk Level: Medium

Changes from Previous Version

No structural changes between v5.0.1 and v5.0.2.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.