This commit is contained in:
dsyoon
2024-02-04 00:46:11 +09:00
parent c919b1b009
commit 703ea6917c
2 changed files with 7 additions and 7 deletions

View File

@@ -966,9 +966,9 @@ if __name__ == "__main__":
stockFileName = os.path.join(RESOURCE_PATH, 'stock.db')
analyzer = AnalyzerSqlite(stockFileName)
analyzer.analyzeDaily()
analyzer.analyzeGrouping("weekly")
analyzer.analyzeGrouping("monthly")
#analyzer.analyzeDaily()
#analyzer.analyzeGrouping("weekly")
#analyzer.analyzeGrouping("monthly")
# HTML 출력
outPath = os.path.join(PROJECT_HOME, "resources", "analysis")

View File

@@ -579,9 +579,9 @@ class Common:
rise_rate = param['bull'][0] / (param['bull'][0]+param['bear'][0]+param['bull'][0])
if (
(stock['macd'][1] < stock['macd'][0] and stock['rsi'][0] < 80) or
(stock['rsi'][1] < stock['rsi'][0] and np.min(stock['rsi'][:3]) < 35) or
(stock['rsi'][0] < 35) or
((stock['macd'][1] is not None and stock['macd'][0] is not None) and stock['macd'][1] < stock['macd'][0] and stock['rsi'][0] < 80) or
((stock['rsi'][1] is not None and stock['rsi'][0] is not None) and stock['rsi'][1] < stock['rsi'][0] and np.min(stock['rsi'][:3]) < 35) or
((stock['rsi'][0] is not None) and stock['rsi'][0] < 35) or
0.7 <= rise_rate
):
# avg300 상승
@@ -613,7 +613,7 @@ class Common:
buy_type = "rsi"
check = True
if not(stock['rsi'][1] < stock['rsi'][0] and stock['rsis'][0] < stock['rsi'][0]):
if (stock['rsi'][1] is not None and stock['rsi'][0] is not None) and not(stock['rsi'][1] < stock['rsi'][0] and stock['rsis'][0] < stock['rsi'][0]):
check = False
return check