MontrealTradingGroup / freqtrade

Simple High Frequency Trading Bot for crypto currencies
GNU General Public License v3.0
70 stars 61 forks source link

Plot dataframe error #6

Closed OtenMoten closed 4 years ago

OtenMoten commented 4 years ago

Hello dear community,

python3 ./scripts/plot_dataframe.py -s BBRSI -p ADA/BTC

from this lection

results in

2019-11-04 10:10:58,778 - freqtrade.exchange - INFO - Using Exchange "Binance" Traceback (most recent call last): File "./scripts/plot_dataframe.py", line 381, in <module> main(sys.argv[1:]) File "./scripts/plot_dataframe.py", line 376, in main plot_parse_args(sysargv) File "./scripts/plot_dataframe.py", line 158, in plot_analyzed_dataframe trades = load_trades(args, pair, timerange) File "./scripts/plot_dataframe.py", line 77, in load_trades with file.open() as f: File "/usr/lib/python3.6/pathlib.py", line 1183, in open opener=self._opener) File "/usr/lib/python3.6/pathlib.py", line 1037, in _opener return self._accessor.open(self, flags, mode) File "/usr/lib/python3.6/pathlib.py", line 387, in wrapped return strfunc(str(pathobj), *args) No such file or directory: 'user_data/backtest_data/backtest-result.json'

Does anybody experienced the same?

Kind regards

OtenMoten commented 4 years ago

Hell yeah,

I've got a workaround. In the previous post there was a little mistake from me - nvm.

From the beginning:

  1. I've struggle with lection 34. Backtesting Strategy & Plotting result because there is a deviation between the tutorial and reality on Ubuntu machine.

  2. Everything else from the tutorial on Udemy was closely perfect.

  3. For you all I've gathered all the informations from the video AND the MontrealTradingGroup Github-Repository:

wget https://raw.githubusercontent.com/MontrealTradingGroup/deployPython3VM/master/python-pip3.sh 
sh python-pip3.sh 
pip3 install virtualenv --user 
mkdir .env 
virtualenv .env/freqtrade 
source .env/freqtrade/bin/activate 
(.env) mtg@mtgvb:~/$ deactivate 
sudo apt-get install git 
git clone https://github.com/MontrealTradingGroup/freqtrade.git 
cd freqtrade 
sudo apt-get install make build-essential python3-dev 
git checkout develop 
sh ./install_ta-lib.sh 
./setup.sh --install 
source .env/bin/activate 
(.env) mtg@mtgvb:~/freqtrade$ pip install numpy 
(.env) mtg@mtgvb:~/freqtrade$ pip install -e . 
(.env) mtg@mtgvb:~/freqtrade$ python3.6 ./freqtrade/main.py -c config.json
(.env) mtg@mtgvb:~/freqtrade$ python3.6 ./freqtrade/main.py -c config.json -s BBRSI  backtesting --export trades --export-filename user_data/backtest_data/backtest-result.json
(.env) mtg@mtgvb:~/freqtrade$ python3 ./scripts/plot_dataframe.py -s BBRSI ADA/BTC

Then it works!

The clue is to get the backtest-result.json to be generated. The comment I found here from @xmatthias python3.6 ./freqtrade/main.py -c config.json -s BBRSI backtesting --export trades --export-filename user_data/backtest_data/backtest-result.json is sovling the issue.

Thanks all for helping.

Maximal profits to you all.

Refer to this post

EDIT:

If somebody got this error:

ImportError: libta_lib.so.0: cannot open shared object file: No such file or directory

This is my work around:

[SOURCE]

  1. http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
  2. https://sourceforge.net/projects/ta-lib/files/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz
wget [SOURCE]
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib/
./configure --prefix=/usr
make
sudo make install
pip install numpy

If you don't have it installed pip install TA-Lib

If you do have it installed pip install --upgrade --force-reinstall TA-Lib

Got from here