fix
This commit is contained in:
@@ -46,6 +46,12 @@ func (r *RuleFactory) RunRsi(code string) {
|
||||
return
|
||||
}
|
||||
|
||||
if args.RsiOversold == 0 {
|
||||
r.Model.ScoreRsi = -1
|
||||
r.Model.AddDesc("RSI RsiOversold=0,参数错误!")
|
||||
return
|
||||
}
|
||||
|
||||
if conf.BestByProfit != "rsi" {
|
||||
r.Model.ScoreRsi = -1
|
||||
r.Model.AddDesc("BestByProfit不是RSI")
|
||||
@@ -72,6 +78,12 @@ func (r *RuleFactory) RunRsi(code string) {
|
||||
prveRsiInt := int(prveRsi)
|
||||
lastRsiInt := int(lastRsi)
|
||||
|
||||
if lastRsiInt == 0 {
|
||||
r.Model.ScoreRsi = -1
|
||||
r.Model.AddDesc("RSI lastRsiInt=0,计算错误!")
|
||||
return
|
||||
}
|
||||
|
||||
// 跌破RSI下轨
|
||||
if lastRsiInt > args.RsiOversold {
|
||||
if CheckLowest(close, lastRsiInt, 14) {
|
||||
|
||||
Reference in New Issue
Block a user