From 2f0a01b40ec9b786dae34c818e1ea634e2871296 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Sun, 22 Dec 2024 00:21:58 +0800 Subject: [PATCH] stock rsi push to elasticsearch --- modules/extent.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/extent.go b/modules/extent.go index a3c577f..a3b60f2 100644 --- a/modules/extent.go +++ b/modules/extent.go @@ -315,11 +315,6 @@ func MakeRsi(cr *core.Core, cl *core.Candle, count int) (error, int) { if duration > time.Duration(periodMins-1)*time.Minute { rsi.Confirm = true } - fmt.Println("will send rsi") - go func() { - fmt.Println("make a rsi") - cr.RsiProcessChan <- &rsi - }() percentK, percentD, err := CalculateStochRSI(rsiList, count, 3, 3) if err != nil { @@ -338,6 +333,12 @@ func MakeRsi(cr *core.Core, cl *core.Candle, count int) (error, int) { DVol: percentD[len(percentD)-1], Confirm: true, } + + fmt.Println("will send rsi") + go func() { + fmt.Println("make a rsi") + cr.RsiProcessChan <- &rsi + }() fmt.Println("will send stockrsi") go func() { fmt.Println("make a stockrsi")