Implement the Hull Moving Average (HMA) trading strategy using the existing trend.Hma indicator.
Location: strategy/trend/hma_strategy.go
Strategy Rules:
- Buy Action: Current price crosses above the Hull Moving Average.
- Sell Action: Current price crosses below the Hull Moving Average.
- Hold Action: Otherwise.
Implementation Details:
- Follow the
strategy.Strategy interface.
- Use
trend.NewHmaWithPeriod() or allow custom parameters.
- Provide unit tests with historical data in
strategy/trend/testdata/hma_strategy.csv.
- Ensure 100% test coverage.
Implement the Hull Moving Average (HMA) trading strategy using the existing
trend.Hmaindicator.Location:
strategy/trend/hma_strategy.goStrategy Rules:
Implementation Details:
strategy.Strategyinterface.trend.NewHmaWithPeriod()or allow custom parameters.strategy/trend/testdata/hma_strategy.csv.