Implement the Williams %R trading strategy using the existing momentum.WilliamsR indicator.
Location: strategy/momentum/williams_r_strategy.go
Strategy Rules:
- Buy Action: Williams %R crosses above -80 (recovering from oversold).
- Sell Action: Williams %R crosses below -20 (recovering from overbought).
- Hold Action: Otherwise.
Implementation Details:
- Follow the
strategy.Strategy interface.
- Use
momentum.NewWilliamsR() or allow custom parameters.
- Provide unit tests with historical data in
strategy/momentum/testdata/williams_r_strategy.csv.
- Ensure 100% test coverage.
Implement the Williams %R trading strategy using the existing
momentum.WilliamsRindicator.Location:
strategy/momentum/williams_r_strategy.goStrategy Rules:
Implementation Details:
strategy.Strategyinterface.momentum.NewWilliamsR()or allow custom parameters.strategy/momentum/testdata/williams_r_strategy.csv.