Skip to main content
Any Framework

Williams R Mean Reversion Strategy (C#)

Published
Aug 7, 2025
1y ago
Total Downloads
2.1K
2,108

Install

dotnet add package StockSharp.Strategies.0239_Williams_R_Mean_Reversion --version 5.0.2

No framework information available.

README

Williams R Mean Reversion Strategy (C# Version)

Williams %R oscillates between 0 and -100 to show when price closes near the extremes of its recent range. This strategy fades those extremes once the indicator stretches far from its own average.

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

A long trade triggers when Williams %R falls below the average minus DeviationMultiplier times the standard deviation. A short trade is taken when it rises above the average plus that multiplier. Exits occur when Williams %R moves back toward its average level.

The approach suits traders who rely on momentum exhaustion to time entries. A protective stop-loss limits risk if price keeps moving to new extremes.

Details

  • Entry Criteria:
    • Long: %R < Avg - DeviationMultiplier * StdDev
    • Short: %R > Avg + DeviationMultiplier * StdDev
  • Long/Short: Both sides.
  • Exit Criteria:
    • Long: Exit when %R > Avg
    • Short: Exit when %R < Avg
  • Stops: Yes, percent stop-loss.
  • Default Values:
    • WilliamsRPeriod = 14
    • AveragePeriod = 20
    • DeviationMultiplier = 2m
    • CandleType = TimeSpan.FromMinutes(5)
  • Filters:
    • Category: Mean Reversion
    • Direction: Both
    • Indicators: Williams %R
    • Stops: Yes
    • Complexity: Intermediate
    • Timeframe: Intraday
    • 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.