init
This commit is contained in:
@@ -120,10 +120,12 @@ class BuySellChecker():
|
|||||||
df_signal = data_signal.loc[df_tmp]
|
df_signal = data_signal.loc[df_tmp]
|
||||||
si = len(df_signal) - 1
|
si = len(df_signal) - 1
|
||||||
|
|
||||||
|
i = i - 5
|
||||||
check = False
|
check = False
|
||||||
duration = 5 + 60
|
duration = 5 + 60
|
||||||
if duration < i:
|
if duration < i:
|
||||||
if np.average(data['trend_avg'][i - duration:i]) < data['trend_avg'][i]:
|
if np.average(data['trend_avg'][i - duration:i]) < data['trend_avg'][i]:
|
||||||
|
|
||||||
if np.average(data['avg480'][i - duration:i]) < data['avg480'][i]:
|
if np.average(data['avg480'][i - duration:i]) < data['avg480'][i]:
|
||||||
if data['avg480'][i] < data['trend_avg'][i]:
|
if data['avg480'][i] < data['trend_avg'][i]:
|
||||||
if data['avg20'][i] < data['avg480'][i] and data['avg20'][i - 1] < data['avg20'][i]:
|
if data['avg20'][i] < data['avg480'][i] and data['avg20'][i - 1] < data['avg20'][i]:
|
||||||
@@ -140,22 +142,6 @@ class BuySellChecker():
|
|||||||
buy_type = 'upward'
|
buy_type = 'upward'
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
if data['disparity_avg20'][i] < BUY_LIST['disparity']['limit_bottom_10']['avg20']:
|
|
||||||
buy_type = 'disparity_avg20'
|
|
||||||
check = True
|
|
||||||
|
|
||||||
if data['disparity_avg60'][i] < BUY_LIST['disparity']['limit_bottom_10']['avg60']:
|
|
||||||
buy_type = 'disparity_avg60'
|
|
||||||
check = True
|
|
||||||
|
|
||||||
if data['disparity_avg480'][i] < BUY_LIST['disparity']['limit_bottom_10']['avg480']:
|
|
||||||
buy_type = 'disparity_avg1500'
|
|
||||||
check = True
|
|
||||||
|
|
||||||
if data['disparity_avg1500'][i] < BUY_LIST['disparity']['limit_bottom_10']['avg1500']:
|
|
||||||
buy_type = 'disparity_avg1500'
|
|
||||||
check = True
|
|
||||||
|
|
||||||
if data['disparity_avg20'][i] < BUY_LIST['disparity']['limit_bottom_1']['avg20']:
|
if data['disparity_avg20'][i] < BUY_LIST['disparity']['limit_bottom_1']['avg20']:
|
||||||
buy_type = 'disparity_avg20'
|
buy_type = 'disparity_avg20'
|
||||||
check = True
|
check = True
|
||||||
@@ -164,11 +150,11 @@ class BuySellChecker():
|
|||||||
buy_type = 'disparity_avg60'
|
buy_type = 'disparity_avg60'
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
if data['disparity_avg480'][i] < BUY_LIST['disparity']['limit_bottom_1']['avg480']:
|
if data['disparity_avg480'][i] < BUY_LIST['disparity']['limit_bottom_3']['avg480']:
|
||||||
buy_type = 'disparity_avg1500'
|
buy_type = 'disparity_avg1500'
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
if data['disparity_avg1500'][i] < BUY_LIST['disparity']['limit_bottom_1']['avg1500']:
|
if data['disparity_avg1500'][i] < BUY_LIST['disparity']['limit_bottom_5']['avg1500']:
|
||||||
buy_type = 'disparity_avg1500'
|
buy_type = 'disparity_avg1500'
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
@@ -203,13 +189,16 @@ class BuySellChecker():
|
|||||||
check = True
|
check = True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if BUY_LIST['disparity']['limit_top_5']['avg20'] < data['disparity_avg20'][i]:
|
if BUY_LIST['disparity']['limit_top_3']['avg20'] < data['disparity_avg20'][i]:
|
||||||
|
check = True
|
||||||
|
|
||||||
|
if BUY_LIST['disparity']['limit_top_3']['avg60'] < data['disparity_avg60'][i]:
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
if BUY_LIST['disparity']['limit_top_5']['avg480'] < data['disparity_avg480'][i]:
|
if BUY_LIST['disparity']['limit_top_5']['avg480'] < data['disparity_avg480'][i]:
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
if BUY_LIST['disparity']['limit_top_5']['avg1500'] < data['disparity_avg1500'][i]:
|
if BUY_LIST['disparity']['limit_top_10']['avg1500'] < data['disparity_avg1500'][i]:
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
# if data['avg1500'][i-1] < data['trend_avg'][i-1] and data['trend_avg'][i] <= data['avg1500'][i]:
|
# if data['avg1500'][i-1] < data['trend_avg'][i-1] and data['trend_avg'][i] <= data['avg1500'][i]:
|
||||||
|
|||||||
Reference in New Issue
Block a user