Skip to main content
Published
Jul 20, 2025
1y ago
Total Downloads
1.5K
1,523

Install

dotnet add package StockSharp.Strategies.0239_Williams_R_Mean_Reversion.py --version 5.0.0

No framework information available.

README

Williams R Mean Reversion Strategy (Python 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.

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

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.