stock rsi push to elasticsearch

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-21 23:23:28 +08:00
parent fb0d242307
commit 43b8884ea5

View File

@ -314,7 +314,9 @@ func MakeRsi(cr *core.Core, cl *core.Candle, count int) (error, int) {
if duration > time.Duration(periodMins-1)*time.Minute { if duration > time.Duration(periodMins-1)*time.Minute {
rsi.Confirm = true rsi.Confirm = true
} }
go func() {
cr.RsiProcessChan <- &rsi cr.RsiProcessChan <- &rsi
}()
percentK, percentD, err := CalculateStochRSI(rsiList, count, 3, 3) percentK, percentD, err := CalculateStochRSI(rsiList, count, 3, 3)
if err != nil { if err != nil {
@ -333,8 +335,10 @@ func MakeRsi(cr *core.Core, cl *core.Candle, count int) (error, int) {
DVol: percentD[len(percentD)-1], DVol: percentD[len(percentD)-1],
Confirm: true, Confirm: true,
} }
go func() {
cr.StockRsiProcessChan <- &srsi cr.StockRsiProcessChan <- &srsi
}()
return nil, 0 return nil, 0
} }
func MakeMaX(cr *core.Core, cl *core.Candle, count int) (error, int) { func MakeMaX(cr *core.Core, cl *core.Candle, count int) (error, int) {