diff --git a/cmd/indicator-backtest/main.go b/cmd/indicator-backtest/main.go index f702bc5..877385c 100644 --- a/cmd/indicator-backtest/main.go +++ b/cmd/indicator-backtest/main.go @@ -18,6 +18,7 @@ import ( "github.com/cinar/indicator/v2/strategy/momentum" "github.com/cinar/indicator/v2/strategy/trend" "github.com/cinar/indicator/v2/strategy/volatility" + "github.com/cinar/indicator/v2/strategy/volume" ) func main() { @@ -70,6 +71,7 @@ func main() { backtester.Strategies = append(backtester.Strategies, strategy.AllStrategies()...) backtester.Strategies = append(backtester.Strategies, trend.AllStrategies()...) backtester.Strategies = append(backtester.Strategies, volatility.AllStrategies()...) + backtester.Strategies = append(backtester.Strategies, volume.AllStrategies()...) if addSplits { backtester.Strategies = append(backtester.Strategies, strategy.AllSplitStrategies(backtester.Strategies)...) diff --git a/strategy/volume/money_flow_index_strategy.go b/strategy/volume/money_flow_index_strategy.go index 9e292d1..f51d4de 100644 --- a/strategy/volume/money_flow_index_strategy.go +++ b/strategy/volume/money_flow_index_strategy.go @@ -54,7 +54,7 @@ func NewMoneyFlowIndexStrategyWith(sellAt, buyAt float64) *MoneyFlowIndexStrateg // Name returns the name of the strategy. func (m *MoneyFlowIndexStrategy) Name() string { - return fmt.Sprintf("Money Flow Index Strategy (%f)", m.SellAt) + return fmt.Sprintf("Money Flow Index Strategy (%f,%f)", m.SellAt, m.BuyAt) } // Compute processes the provided asset snapshots and generates a stream of actionable recommendations. diff --git a/strategy/volume/volume.go b/strategy/volume/volume.go index e0fa6ee..919be8d 100644 --- a/strategy/volume/volume.go +++ b/strategy/volume/volume.go @@ -24,5 +24,7 @@ import ( // AllStrategies returns a slice containing references to all available volume strategies. func AllStrategies() []strategy.Strategy { - return []strategy.Strategy{} + return []strategy.Strategy{ + NewMoneyFlowIndexStrategy(), + } }