init
This commit is contained in:
39
monitor.py
39
monitor.py
@@ -131,8 +131,46 @@ class Monitor:
|
|||||||
)
|
)
|
||||||
return normalized_data
|
return normalized_data
|
||||||
|
|
||||||
|
def inverse_data(self, data: pd.DataFrame) -> pd.DataFrame:
|
||||||
|
"""원본 data 가격 시계를 상하 대칭(글로벌 min/max 기준)으로 반전하여 하락↔상승 트렌드를 뒤집는다."""
|
||||||
|
price_cols = ['Open', 'High', 'Low', 'Close']
|
||||||
|
inv = data.copy()
|
||||||
|
global_min = data[price_cols].min().min()
|
||||||
|
global_max = data[price_cols].max().max()
|
||||||
|
# 축 기준은 global_mid = (max+min), so transformed = max+min - price
|
||||||
|
for col in price_cols:
|
||||||
|
inv[col] = global_max + global_min - data[col]
|
||||||
|
# Volume은 그대로 유지
|
||||||
|
inv['Volume'] = data['Volume']
|
||||||
|
# 지표 다시 계산
|
||||||
|
inv = self.normalize_data(inv)
|
||||||
|
|
||||||
|
inv['MA5'] = inv['Close'].rolling(window=5).mean()
|
||||||
|
inv['MA20'] = inv['Close'].rolling(window=20).mean()
|
||||||
|
inv['MA40'] = inv['Close'].rolling(window=40).mean()
|
||||||
|
inv['MA120'] = inv['Close'].rolling(window=120).mean()
|
||||||
|
inv['MA200'] = inv['Close'].rolling(window=200).mean()
|
||||||
|
inv['MA240'] = inv['Close'].rolling(window=240).mean()
|
||||||
|
inv['MA720'] = inv['Close'].rolling(window=720).mean()
|
||||||
|
inv['MA1440'] = inv['Close'].rolling(window=1440).mean()
|
||||||
|
inv['Deviation5'] = (inv['Close'] / inv['MA5']) * 100
|
||||||
|
inv['Deviation20'] = (inv['Close'] / inv['MA20']) * 100
|
||||||
|
inv['Deviation40'] = (inv['Close'] / inv['MA40']) * 100
|
||||||
|
inv['Deviation120'] = (inv['Close'] / inv['MA120']) * 100
|
||||||
|
inv['Deviation200'] = (inv['Close'] / inv['MA200']) * 100
|
||||||
|
inv['Deviation240'] = (inv['Close'] / inv['MA240']) * 100
|
||||||
|
inv['Deviation720'] = (inv['Close'] / inv['MA720']) * 100
|
||||||
|
inv['Deviation1440'] = (inv['Close'] / inv['MA1440']) * 100
|
||||||
|
inv['golden_cross'] = (inv['MA5'] > inv['MA20']) & (inv['MA5'].shift(1) <= inv['MA20'].shift(1))
|
||||||
|
inv['MA'] = inv['Close'].rolling(window=20).mean()
|
||||||
|
inv['STD'] = inv['Close'].rolling(window=20).std()
|
||||||
|
inv['Upper'] = inv['MA'] + (2 * inv['STD'])
|
||||||
|
inv['Lower'] = inv['MA'] - (2 * inv['STD'])
|
||||||
|
return inv
|
||||||
|
|
||||||
def calculate_technical_indicators(self, data: pd.DataFrame) -> pd.DataFrame:
|
def calculate_technical_indicators(self, data: pd.DataFrame) -> pd.DataFrame:
|
||||||
data = self.normalize_data(data)
|
data = self.normalize_data(data)
|
||||||
|
|
||||||
data['MA5'] = data['Close'].rolling(window=5).mean()
|
data['MA5'] = data['Close'].rolling(window=5).mean()
|
||||||
data['MA20'] = data['Close'].rolling(window=20).mean()
|
data['MA20'] = data['Close'].rolling(window=20).mean()
|
||||||
data['MA40'] = data['Close'].rolling(window=40).mean()
|
data['MA40'] = data['Close'].rolling(window=40).mean()
|
||||||
@@ -154,6 +192,7 @@ class Monitor:
|
|||||||
data['STD'] = data['Close'].rolling(window=20).std()
|
data['STD'] = data['Close'].rolling(window=20).std()
|
||||||
data['Upper'] = data['MA'] + (2 * data['STD'])
|
data['Upper'] = data['MA'] + (2 * data['STD'])
|
||||||
data['Lower'] = data['MA'] - (2 * data['STD'])
|
data['Lower'] = data['MA'] - (2 * data['STD'])
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
# ------------- Strategy -------------
|
# ------------- Strategy -------------
|
||||||
|
|||||||
@@ -17,16 +17,22 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData= self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
continue
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
continue
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
|
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
continue
|
continue
|
||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
continue
|
continue
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
continue
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData= self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
continue
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
continue
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -24,9 +32,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
continue
|
continue
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
continue
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData= self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
continue
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
continue
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -24,9 +32,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
continue
|
continue
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
continue
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -22,6 +22,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -29,9 +37,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ class MonitorCoin (Monitor):
|
|||||||
data = self.get_coin_some_data(symbol, interval)
|
data = self.get_coin_some_data(symbol, interval)
|
||||||
if data is not None and not data.empty:
|
if data is not None and not data.empty:
|
||||||
try:
|
try:
|
||||||
|
inverseData = self.inverse_data(data)
|
||||||
|
recent_inverseData = self.check_buy_point(symbol, inverseData)
|
||||||
|
if recent_inverseData['sell_point'].iloc[-1] != 1:
|
||||||
|
return
|
||||||
|
sell_success = self.sell_ticker(symbol, recent_inverseData)
|
||||||
|
if not sell_success:
|
||||||
|
return
|
||||||
|
|
||||||
data = self.calculate_technical_indicators(data)
|
data = self.calculate_technical_indicators(data)
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
recent_data = self.check_buy_point(symbol, data)
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
if recent_data['buy_point'].iloc[-1] != 1:
|
||||||
@@ -23,9 +31,6 @@ class MonitorCoin (Monitor):
|
|||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
buy_success = self.buy_ticker(symbol, recent_data)
|
||||||
if not buy_success:
|
if not buy_success:
|
||||||
return
|
return
|
||||||
sell_success = self.sell_ticker(symbol, recent_data)
|
|
||||||
if not sell_success:
|
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
print(f"Error processing data for {symbol}: {str(e)}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user