deving
This commit is contained in:
@@ -1,27 +1,17 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"git.apinb.com/quant/gostock/internal/logic/types"
|
||||
)
|
||||
|
||||
type ST struct {
|
||||
Key string
|
||||
Name string
|
||||
}
|
||||
|
||||
func NewST() *ST {
|
||||
return &ST{
|
||||
Key: "ST",
|
||||
Name: "ST",
|
||||
}
|
||||
}
|
||||
|
||||
func (r *ST) Run(in string) *types.RuleResult {
|
||||
func (r *RuleFactory) RunST(in string) {
|
||||
log.Println("RunST:", r.Model.Code, "Args:", in)
|
||||
if strings.Contains(in, "ST") {
|
||||
return &types.RuleResult{Key: r.Key, Name: r.Name, Score: -1, Desc: "有退市风险"}
|
||||
r.Model.StScore = -1
|
||||
r.Model.AddDesc("有退市风险")
|
||||
return
|
||||
}
|
||||
|
||||
return &types.RuleResult{Key: r.Key, Name: r.Name, Score: 1, Desc: "无退市风险"}
|
||||
r.Model.StScore = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user