fix bug
This commit is contained in:
@@ -20,8 +20,30 @@ func main() {
|
||||
config.New(ServiceKey)
|
||||
impl.NewImpl()
|
||||
|
||||
basic := strategy.GetBasic("000012.SZ")
|
||||
var okStocks []string
|
||||
for _, code := range strategy.GetStocks() {
|
||||
basic := strategy.GetBasic(code)
|
||||
|
||||
result := rule.NewUpDate().Run(basic.ListDate)
|
||||
if result.Score >0 {
|
||||
okStocks = append(okStocks, code)
|
||||
} else
|
||||
result := []*types.RuleResult{
|
||||
,
|
||||
rule.NewST().Run(basic.Name),
|
||||
rule.NewIdustry().Run(basic.Industry),
|
||||
rule.NewPrice().Run(basic.TsCode),
|
||||
rule.NewAmount().Run(basic.TsCode),
|
||||
}
|
||||
}
|
||||
|
||||
printer.Json(result)
|
||||
|
||||
log.Println("Done!")
|
||||
}
|
||||
|
||||
func RuleFilter(code string){
|
||||
basic := strategy.GetBasic(code)
|
||||
result := []*types.RuleResult{
|
||||
rule.NewUpDate().Run(basic.ListDate),
|
||||
rule.NewST().Run(basic.Name),
|
||||
@@ -29,8 +51,4 @@ func main() {
|
||||
rule.NewPrice().Run(basic.TsCode),
|
||||
rule.NewAmount().Run(basic.TsCode),
|
||||
}
|
||||
|
||||
printer.Json(result)
|
||||
|
||||
log.Println("Done!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user