bitunix-automated-crypto-trading 3.2.0__py3-none-any.whl → 3.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bitunix_automated_crypto_trading/TickerManager.py +12 -9
- bitunix_automated_crypto_trading/version.py +1 -1
- {bitunix_automated_crypto_trading-3.2.0.dist-info → bitunix_automated_crypto_trading-3.2.1.dist-info}/METADATA +1 -1
- {bitunix_automated_crypto_trading-3.2.0.dist-info → bitunix_automated_crypto_trading-3.2.1.dist-info}/RECORD +7 -7
- {bitunix_automated_crypto_trading-3.2.0.dist-info → bitunix_automated_crypto_trading-3.2.1.dist-info}/WHEEL +0 -0
- {bitunix_automated_crypto_trading-3.2.0.dist-info → bitunix_automated_crypto_trading-3.2.1.dist-info}/entry_points.txt +0 -0
- {bitunix_automated_crypto_trading-3.2.0.dist-info → bitunix_automated_crypto_trading-3.2.1.dist-info}/top_level.txt +0 -0
@@ -87,13 +87,17 @@ class Interval:
|
|
87
87
|
df['ma_slow_angle'] = np.degrees(np.arctan(df['ma_slow_slope']))
|
88
88
|
df.fillna({'ma_slow_slope':0}, inplace=True)
|
89
89
|
df.fillna({'ma_slow_angle':0}, inplace=True)
|
90
|
+
|
91
|
+
df['ma_spread'] = (df['ma_fast'] - df['ma_slow']).diff()
|
92
|
+
df.fillna({'ma_spread':0}, inplace=True)
|
93
|
+
df.fillna({'ma_spread':0}, inplace=True)
|
90
94
|
|
91
95
|
if self.settings.EMA_CROSSING:
|
92
96
|
if df is not None and len(df) >= 2:
|
93
|
-
if df['ma_medium'].iloc[-2] <= df['ma_slow'].iloc[-2] and df['ma_medium'].iloc[-1] > df['ma_slow'].iloc[-1]:
|
97
|
+
if df['ma_medium'].iloc[-2] <= df['ma_slow'].iloc[-2] and df['ma_medium'].iloc[-1] > df['ma_slow'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
94
98
|
self.ema_open_signal = "BUY"
|
95
99
|
self.ema_close_signal = "BUY"
|
96
|
-
elif df['ma_medium'].iloc[-2] >= df['ma_slow'].iloc[-2] and df['ma_medium'].iloc[-1] < df['ma_slow'].iloc[-1]:
|
100
|
+
elif df['ma_medium'].iloc[-2] >= df['ma_slow'].iloc[-2] and df['ma_medium'].iloc[-1] < df['ma_slow'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
97
101
|
self.ema_open_signal = "SELL"
|
98
102
|
self.ema_close_signal = "SELL"
|
99
103
|
else:
|
@@ -101,18 +105,18 @@ class Interval:
|
|
101
105
|
self.ema_close_signal = "HOLD"
|
102
106
|
|
103
107
|
if self.settings.EMA_CLOSE_ON_FAST_MEDIUM:
|
104
|
-
if df['ma_fast'].iloc[-2] <= df['ma_medium'].iloc[-2] and df['ma_fast'].iloc[-1] > df['ma_medium'].iloc[-1]:
|
108
|
+
if df['ma_fast'].iloc[-2] <= df['ma_medium'].iloc[-2] and df['ma_fast'].iloc[-1] > df['ma_medium'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
105
109
|
self.ema_close_signal = "BUY"
|
106
|
-
elif df['ma_fast'].iloc[-2] >= df['ma_medium'].iloc[-2] and df['ma_fast'].iloc[-1] < df['ma_medium'].iloc[-1]:
|
110
|
+
elif df['ma_fast'].iloc[-2] >= df['ma_medium'].iloc[-2] and df['ma_fast'].iloc[-1] < df['ma_medium'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
107
111
|
self.ema_close_signal = "SELL"
|
108
112
|
else:
|
109
113
|
self.ema_close_signal = "HOLD"
|
110
114
|
else:
|
111
115
|
if df is not None and len(df) >= 1:
|
112
|
-
if df['close'].iloc[-1] > df['ma_medium'].iloc[-1] and df['ma_medium'].iloc[-1] > df['ma_slow'].iloc[-1]:
|
116
|
+
if df['close'].iloc[-1] > df['ma_medium'].iloc[-1] and df['ma_medium'].iloc[-1] > df['ma_slow'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
113
117
|
self.ema_open_signal = "BUY"
|
114
118
|
self.ema_close_signal = "BUY"
|
115
|
-
elif df['close'].iloc[-1] < df['ma_medium'].iloc[-1] and df['ma_medium'].iloc[-1] < df['ma_slow'].iloc[-1]:
|
119
|
+
elif df['close'].iloc[-1] < df['ma_medium'].iloc[-1] and df['ma_medium'].iloc[-1] < df['ma_slow'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
116
120
|
self.ema_open_signal = "SELL"
|
117
121
|
self.ema_close_signal = "SELL"
|
118
122
|
else:
|
@@ -120,9 +124,9 @@ class Interval:
|
|
120
124
|
self.ema_close_signal = "HOLD"
|
121
125
|
|
122
126
|
if self.settings.EMA_CLOSE_ON_FAST_MEDIUM:
|
123
|
-
if df['close'].iloc[-1] > df['ma_fast'].iloc[-1] and df['ma_fast'].iloc[-1] > df['ma_medium'].iloc[-1]:
|
127
|
+
if df['close'].iloc[-1] > df['ma_fast'].iloc[-1] and df['ma_fast'].iloc[-1] > df['ma_medium'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
124
128
|
self.ema_close_signal = "BUY"
|
125
|
-
elif df['close'].iloc[-1] < df['ma_fast'].iloc[-1] and df['ma_fast'].iloc[-1] < df['ma_medium'].iloc[-1]:
|
129
|
+
elif df['close'].iloc[-1] < df['ma_fast'].iloc[-1] and df['ma_fast'].iloc[-1] < df['ma_medium'].iloc[-1] and df['ma_spread'].iloc[-1] > 0:
|
126
130
|
self.ema_close_signal = "SELL"
|
127
131
|
else:
|
128
132
|
self.ema_close_signal = "HOLD"
|
@@ -740,7 +744,6 @@ class Tickers:
|
|
740
744
|
f"{period}_cb": intervalObj.signal_strength,
|
741
745
|
f"{period}_barcolor": lastcandle['barcolor'],
|
742
746
|
f"{period}_ema_open": intervalObj.ema_open_signal,
|
743
|
-
f"{period}_ema_open": intervalObj.ema_open_signal,
|
744
747
|
f"{period}_ema_close": intervalObj.ema_close_signal,
|
745
748
|
f"{period}_macd":intervalObj.macd_signal,
|
746
749
|
f"{period}_bbm":intervalObj.bbm_signal,
|
@@ -1 +1 @@
|
|
1
|
-
__version__ = "3.2.
|
1
|
+
__version__ = "3.2.1"
|
@@ -6,14 +6,14 @@ bitunix_automated_crypto_trading/DataFrameHtmlRenderer.py,sha256=Pqdzhh_nfIxFEZH
|
|
6
6
|
bitunix_automated_crypto_trading/NotificationManager.py,sha256=exs6REABBA1omTeTGuUuECzxs5dGqdyL7oI8WyxS6Xc,798
|
7
7
|
bitunix_automated_crypto_trading/SupportResistance.py,sha256=x_to4M4OHg0h8o40DXDBa4E_5io-y2Lb5qo2VzFnu_8,5765
|
8
8
|
bitunix_automated_crypto_trading/ThreadManager.py,sha256=Lw5_1EIT0m3AFSv5CIMpnjtA0DnNw2qQ6JtSpT34LyM,2349
|
9
|
-
bitunix_automated_crypto_trading/TickerManager.py,sha256=
|
9
|
+
bitunix_automated_crypto_trading/TickerManager.py,sha256=xzFzH1qDxCGi2bNji1fO8t7WM971RtN-HsUTWxTn7Ic,42717
|
10
10
|
bitunix_automated_crypto_trading/__init__.py,sha256=1hzk6nX8NnUCr1tsq8oFq1qGCNhNwnwldWE75641Eew,78
|
11
11
|
bitunix_automated_crypto_trading/bitunix.py,sha256=JGjPiFbk5HIuCFGyMhpqCIKKD2MXrpoxTXPvzLyBJ7A,27165
|
12
12
|
bitunix_automated_crypto_trading/config.py,sha256=H9iMKzibh295kQrf4RG66hv7_zF_x8Dvp7uCnFU7Voo,5478
|
13
13
|
bitunix_automated_crypto_trading/logger.py,sha256=NHnA5JZdUFkTAhB7i-1iCAwrdf1fxhDuRvJUkbKPi9Y,2923
|
14
|
-
bitunix_automated_crypto_trading/version.py,sha256=
|
15
|
-
bitunix_automated_crypto_trading-3.2.
|
16
|
-
bitunix_automated_crypto_trading-3.2.
|
17
|
-
bitunix_automated_crypto_trading-3.2.
|
18
|
-
bitunix_automated_crypto_trading-3.2.
|
19
|
-
bitunix_automated_crypto_trading-3.2.
|
14
|
+
bitunix_automated_crypto_trading/version.py,sha256=J63pT2dn-L7FddRjqXZQu2HME4y81dMpl-G5zJhSIHY,21
|
15
|
+
bitunix_automated_crypto_trading-3.2.1.dist-info/METADATA,sha256=aYyn_BCMcYWCbjHvm3kSheeZVJK0G_o9I_Dvi8nx5QM,996
|
16
|
+
bitunix_automated_crypto_trading-3.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
17
|
+
bitunix_automated_crypto_trading-3.2.1.dist-info/entry_points.txt,sha256=UXREYHuSl2XYd_tOtLIq0zg3d1kX3lixX5SpN8yGBw4,82
|
18
|
+
bitunix_automated_crypto_trading-3.2.1.dist-info/top_level.txt,sha256=uyFzHUCOsp8elnG2Ovor6xXcf7dxRxY-C-Txiwix64Q,33
|
19
|
+
bitunix_automated_crypto_trading-3.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|