deving
This commit is contained in:
@@ -26,22 +26,26 @@ type StockArgConf struct {
|
||||
}
|
||||
|
||||
func NewRsi(args *models.StockArgs) *Rsi {
|
||||
rsi := &Rsi{
|
||||
Key: "Rsi",
|
||||
Name: "RSI指标",
|
||||
Conf: nil,
|
||||
Args: nil,
|
||||
}
|
||||
|
||||
if args == nil {
|
||||
return rsi
|
||||
}
|
||||
|
||||
var conf StockArgConf
|
||||
err := json.Unmarshal([]byte(args.Config), &conf)
|
||||
if err != nil {
|
||||
return &Rsi{
|
||||
Key: "Rsi",
|
||||
Name: "RSI指标",
|
||||
Conf: nil,
|
||||
Args: args,
|
||||
}
|
||||
}
|
||||
return &Rsi{
|
||||
Key: "Rsi",
|
||||
Name: "RSI指标",
|
||||
Conf: &conf,
|
||||
Args: args,
|
||||
return rsi
|
||||
}
|
||||
|
||||
rsi.Conf = &conf
|
||||
rsi.Args = args
|
||||
return rsi
|
||||
}
|
||||
|
||||
func (r *Rsi) Run(code string) *types.RuleResult {
|
||||
|
||||
Reference in New Issue
Block a user