bitunix-automated-crypto-trading 3.1.6__tar.gz → 3.1.7__tar.gz

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.
Files changed (23) hide show
  1. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/PKG-INFO +1 -1
  2. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/README.md +1 -0
  3. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/TickerManager.py +10 -7
  4. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/config.py +1 -0
  5. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading.egg-info/PKG-INFO +1 -1
  6. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/setup.py +1 -1
  7. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/AsyncThreadRunner.py +0 -0
  8. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/BitunixApi.py +0 -0
  9. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/BitunixSignal.py +0 -0
  10. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/BitunixWebSocket.py +0 -0
  11. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/DataFrameHtmlRenderer.py +0 -0
  12. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/NotificationManager.py +0 -0
  13. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/SupportResistance.py +0 -0
  14. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/ThreadManager.py +0 -0
  15. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/__init__.py +0 -0
  16. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/bitunix.py +0 -0
  17. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading/logger.py +0 -0
  18. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading.egg-info/SOURCES.txt +0 -0
  19. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading.egg-info/dependency_links.txt +0 -0
  20. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading.egg-info/entry_points.txt +0 -0
  21. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading.egg-info/requires.txt +0 -0
  22. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/bitunix_automated_crypto_trading.egg-info/top_level.txt +0 -0
  23. {bitunix_automated_crypto_trading-3.1.6 → bitunix_automated_crypto_trading-3.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitunix_automated_crypto_trading
3
- Version: 3.1.6
3
+ Version: 3.1.7
4
4
  Summary: Bitunix Futures Auto Trading Platform
5
5
  Home-page: https://github.com/tcj2001/bitunix-automated-crypto-trading
6
6
  Author: tcj2001
@@ -61,6 +61,7 @@ The platform can be configured through the `config.py` file or `config.txt`. Key
61
61
  - `BARS`: Number of bars to use for study and charting
62
62
 
63
63
  - `Technical Indicators Parameters`:
64
+ - `BOS_PERIOD`: Break of structure period, number of bars to look back to determine the previous high or low
64
65
  - `MA_FAST`: Fast moving average period
65
66
  - `MA_MEDIUM`: Medium moving average period
66
67
  - `MA_SLOW`: Slow moving average period
@@ -65,13 +65,16 @@ class Interval:
65
65
 
66
66
  # Break of Strcuture
67
67
  if self.settings.BOS_STUDY:
68
- high = df.iloc[:-1]['high'].max()
69
- low = df.iloc[:-1]['low'].min()
70
- close = df['close'].iloc[-1]
71
- if close > high:
72
- self.bos_signal = "BUY"
73
- elif close < low:
74
- self.bos_signal = "SELL"
68
+ if df['high'].size > 1 and df['low'].size > 1 and df['close'].size > 1:
69
+ high = talib.MAX(df.iloc[:-1]['high'].values, timeperiod=self.settings.BOS_PERIOD)[-1]
70
+ low = talib.MIN(df.iloc[:-1]['low'].values, timeperiod=self.settings.BOS_PERIOD)[-1]
71
+ close = df['close'].iloc[-1]
72
+ if close > high:
73
+ self.bos_signal = "BUY"
74
+ elif close < low:
75
+ self.bos_signal = "SELL"
76
+ else:
77
+ self.bos_signal = "HOLD"
75
78
  else:
76
79
  self.bos_signal = "HOLD"
77
80
  else:
@@ -22,6 +22,7 @@ class Settings(BaseSettings):
22
22
  BARS: int = Field(default=100, ge=1)
23
23
 
24
24
  # Technical Indicators Parameters
25
+ BOS_PERIOD: int = Field(default=20, ge=1)
25
26
  MA_FAST: int = Field(default=10, ge=1)
26
27
  MA_MEDIUM: int = Field(default=20, ge=1)
27
28
  MA_SLOW: int = Field(default=50, ge=1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitunix_automated_crypto_trading
3
- Version: 3.1.6
3
+ Version: 3.1.7
4
4
  Summary: Bitunix Futures Auto Trading Platform
5
5
  Home-page: https://github.com/tcj2001/bitunix-automated-crypto-trading
6
6
  Author: tcj2001
@@ -66,7 +66,7 @@ class CustomInstall(install):
66
66
 
67
67
  setup(
68
68
  name="bitunix_automated_crypto_trading",
69
- version="3.1.6",
69
+ version="3.1.7",
70
70
  license="MIT",
71
71
  author="tcj2001",
72
72
  author_email="thomsonmathews@hotmail.com",