Skip to content

Implement Donchian Channel Breakout Strategy #338

@cinar

Description

@cinar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions