conor19w / Binance-Futures-Trading-Bot

A Technical Analysis Bot that trades leveraged USDT futures markets on Binance.
512 stars 173 forks source link

Error on start (backtest) #2

Closed jdk-sal3 closed 2 years ago

jdk-sal3 commented 2 years ago

Loading Price Data Traceback (most recent call last): File "Bot.py", line 826, in price_data = load(f"C:\Users\conor\Desktop\plots_mean\EquityCurves{TIME_INTERVAL}\price_data.joblib") File "/home/ubuntu/.local/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 579, in load with open(filename, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\conor\Desktop\plots_mean\Equity_Curves_15\price_data.joblib'

Please add requirements file as well

conor19w commented 2 years ago

Turn load_data off on line 778 in Bot.py, The script is trying to load the candlestick data from the specified path 'C:\Users\conor\Desktop\plots_mean\Equity_Curves_15\price_data.joblib' , but this path is from my device where I have the data saved. For now I have not added functionality for users to load/save data. Instead you will have to pull from the server apologies, this should fix the issue.

jdk-sal3 commented 2 years ago

Hi, thanks for your response and update. Now I got another error (not sure if its a code error or I just don't understand how to run the strategy)

Symbols: ['DOGEUSDT', 'SOLUSDT', 'OMGUSDT', 'ADAUSDT', 'XRPUSDT', 'ETHUSDT', 'BTCUSDT', 'MATICUSDT', 'BNBUSDT', 'BAKEUSDT'] Start Balance: 2335 fee: 0.00036 15 min OHLC Candle Sticks from a period of 3 days Traceback (most recent call last): File "Bot.py", line 1215, in CAGR = ((df['cum_return'].iloc[-1])*(1/time_CAGR)-1)100 File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/indexing.py", line 931, in getitem return self._getitem_axis(maybe_callable, axis=axis) File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/indexing.py", line 1566, in _getitem_axis self._validate_integer(key, axis) File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/indexing.py", line 1500, in _validate_integer raise IndexError("single positional indexer is out-of-bounds") IndexError: single positional indexer is out-of-bounds

conor19w commented 2 years ago

No problem at all its good to hear some feedback, I know the code can be difficult to decipher.

jdk-sal3 commented 2 years ago

Many thanks... backtest works now.