You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
package backtest |
|
|
|
import ( |
|
"sig-pub/api/pb" |
|
"sig-pub/pkg/indicator" |
|
"sig-pub/pkg/strategy" |
|
"sig-pub/pkg/types" |
|
) |
|
|
|
type TradingPlanInputRacer struct { |
|
sigStrategyType strategy.SigStrategyType |
|
sigStrategy strategy.ISigStrategy |
|
indicatorReg *indicator.IndicatorRegistry |
|
exchangeClient pb.ExchangeServiceClient |
|
} |
|
|
|
func NewTradingPlanInputRacer( |
|
sigType strategy.SigStrategyType, |
|
strategy strategy.ISigStrategy, |
|
indicatorReg *indicator.IndicatorRegistry, |
|
exchangeClient pb.ExchangeServiceClient, |
|
) *TradingPlanInputRacer { |
|
return &TradingPlanInputRacer{ |
|
sigStrategyType: sigType, |
|
sigStrategy: strategy, |
|
indicatorReg: indicatorReg, |
|
exchangeClient: exchangeClient, |
|
} |
|
} |
|
|
|
func (r *TradingPlanInputRacer) Init() (err error) { |
|
a := types.InputRange{} |
|
_ = a |
|
// plan := &entity.TradePlan{} |
|
// plan.SigStrategy |
|
// SigStrategyParam |
|
// CloseStrategyParam |
|
// TradeStrategyParam |
|
// RiskStrategyParam |
|
// tester := NewTradingPlanBacktester(1, nil, nil, nil) |
|
// tester.Init(10000, *plan) |
|
// result, err := tester.Backtest(nil, nil) |
|
// _, _ = result, err |
|
|
|
return |
|
}
|
|
|