This commit is contained in:
dsyoon
2023-04-16 11:08:26 +09:00
parent cd207e2068
commit 5fd138b239
2 changed files with 7 additions and 25 deletions

View File

@@ -501,14 +501,15 @@ class Common:
c_index = 200
max_volume = max(stock['volume'][1:c_index+1])
if max_volume < stock['volume'][0]:
log = "{:.2f}".format((stock['volume'][0] - max_volume)/max_volume)
if max_volume < stock['volume'][0] and stock['close'][1] < stock['close'][0]:
log = "{:.2f}".format(stock['volume'][0]/max_volume)
return True, log
c_index = 20
sum_volume = sum(stock['volume'][1:c_index + 1])
avg_volume = sum_volume / c_index
if (avg_volume + avg_volume*0.75) < stock['volume'][0]:
log = "{:.2f}".format(max_volume/stock['volume'][0])
if (avg_volume * 5) < stock['volume'][0] and stock['close'][1] < stock['close'][0]:
log = "{:.2f}".format(stock['volume'][0]/max_volume)
return True, log
return False, ""
@@ -526,7 +527,7 @@ class Common:
c_index = 200
if len(stock['close']) > c_index:
max_value = max(stock['close'][1:c_index+1])
if stock['close'][0] < max_value * 0.6:
if max_value * 0.4 < stock['close'][0] < max_value * 0.6:
return True, "{:.2f}".format(stock['close'][0]/max_value)
return False, ""