From 20b4054d91ec9dab686cdeb31c289b6f9a9ae578 Mon Sep 17 00:00:00 2001 From: dosangyoon Date: Tue, 31 Aug 2021 02:41:25 +0900 Subject: [PATCH] init --- stockpredictor/analysis/Analyzer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stockpredictor/analysis/Analyzer.py b/stockpredictor/analysis/Analyzer.py index 5be10fe..860daf9 100644 --- a/stockpredictor/analysis/Analyzer.py +++ b/stockpredictor/analysis/Analyzer.py @@ -518,6 +518,10 @@ class Analyzer: if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg60']: isbuy = 2 + # 위치에너지 < 0.4 and 볼린저밴드 < 0.3 이어야 한다. + if positionalEnergy < 30 or bolingerband_score < 0.3: + isbuy = 0 + fig = self.draw(stock) title = "%s (%s), %s, buy_price (%d), stochastic(%.2f), bolingerband(%.2f), positionalEnergy(%.2f) 차트" % (item_name, item_code, state, buy_price, stochastic_score, bolingerband_score, positionalEnergy) fig['layout'].update(title=title)