Implement the Donchian Channel breakout trading strategy using the existing volatility.DonchianChannel indicator.
Location: strategy/volatility/donchian_channel_strategy.go
Strategy Rules:
- Buy Action: Current price is above the Upper Donchian Channel (e.g., 20-period high).
- Sell Action: Current price is below the Lower Donchian Channel (e.g., 20-period low).
- Hold Action: Otherwise.
Implementation Details:
- Follow the
strategy.Strategy interface.
- Use
volatility.NewDonchianChannel() or allow custom parameters.
- Provide unit tests with historical data in
strategy/volatility/testdata/donchian_channel_strategy.csv.
- Ensure 100% test coverage.
Implement the Donchian Channel breakout trading strategy using the existing
volatility.DonchianChannelindicator.Location:
strategy/volatility/donchian_channel_strategy.goStrategy Rules:
Implementation Details:
strategy.Strategyinterface.volatility.NewDonchianChannel()or allow custom parameters.strategy/volatility/testdata/donchian_channel_strategy.csv.