init
This commit is contained in:
@@ -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, ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user