Freqtrade Install

This revision is from 2024/03/28 10:20. You can Restore it.

Installation doc is https://www.freqtrade.io/en/stable/installation/

  • update repository, install packages

sudo apt-get update

sudo apt install -y python3-pip python3-venv python3-dev python3-pandas git curl

python -m pip install --upgrade pip

  • Download freqtrade repository

git clone https://github.com/freqtrade/freqtrade.git

  • Enter downloaded directory

cd freqtrade

  • Development or stable version, novice user: git checkout stable, advanced user: git checkout develop

git checkout stable

  • Install freqtrade from scratch

./setup.sh -i


Run the bot !


You can now use the bot by executing 'source .venv/bin/activate; freqtrade <subcommand>'.

You can see the list of available bot sub-commands by executing 'source .venv/bin/activate; freqtrade --help'.

You verify that freqtrade is installed successfully by running 'source .venv/bin/activate; freqtrade --version'.

  • Activate virtual environment

source ./.venv/bin/activate

  • Step 1 - Initialize user folder

freqtrade create-userdir --userdir user_data

  • Step 2 - Create a new configuration file

freqtrade new-config --config user_data/config.json

freqtrade list-exchanges

freqtrade list-pairs --exchange binance --trading-mode spot

  • Backtest

freqtrade download-data --exchange binance --pairs BTC/USDT ETH/USDT BNB/USDT --timeframes 5m --timerange=20150131-

freqtrade backtesting --timeframe 5m -c user_data/config.json -s your_strategy

Set static options in config.json. Setting a timerange to ensure open trades are closed at the end of the backtesting and the result incorperated.

freqtrade backtesting --strategy your_strategy --timerange=20180101-20240322 --exchange bianance --currency-pair BTC/USDT ETH/USDT BNB/USDT --data-folder user_data/data/bianace -c user_data/config.json

freqtrade backtesting -c user_data/config.json -s YOLO --timerange=20180101-20240322

  • Dry run, simulation mode

freqtrade trade --config user_data/config.json --strategy your_strategy

Each instance must have a unique database or the strategies trade together.

https://www.freqtrade.io/en/stable/advanced-setup/#running-multiple-instances-of-freqtrade

  • Terminal 1:

freqtrade trade -c user_data/MyConfigBTC.json -s MyCustomStrategy --db-url sqlite:///user_data/tradesBTC.dryrun.sqlite

  • Terminal 2:

freqtrade trade -c user_data/MyConfigUSDT.json -s MyCustomStrategy --db-url sqlite:///user_data/tradesUSDT.dryrun.sqlite

Consider running the bots as a system service.

https://github.com/DutchCryptoDad/FreqtradeInstallAndConfig/tree/main


//freqtrade/rpc/api_server/ui/installed/assets/

npm install uglify-js --global

uglifyjs yourfile.js --compress --mangle --output yourfile.min.js --source-map yourfile.min.js.map

//freqtrade/freqtrade/rpc/api_server/ui/installed/assets

dashboard

grep -irw "(dry)"

  

📝 📜 ⏱️ ⬆️