diff --git a/tools/backtest.sh b/tools/backtest.sh index a8aa97b..ee3c5c0 100755 --- a/tools/backtest.sh +++ b/tools/backtest.sh @@ -1,4 +1,9 @@ #!/bin/bash + +# Parse command line arguments +START_DATE=${1:-$(date -d "2 days ago" +"%Y%m%d")} +END_DATE=${2:-$(date -d "tomorrow" +"%Y%m%d")} + cd ../ source .venv/bin/activate rm -rf user_data/models/* @@ -11,11 +16,11 @@ freqtrade backtesting \ --config config_examples/theforcev7.json \ --strategy-path ./freqtrade/templates \ --strategy TheForceV7 \ - --timerange 20250510-20250513 \ + --timerange ${START_DATE}-${END_DATE} \ --breakdown week month \ --export trades \ --fee 0.0008 \ - --cache none > output.log + --cache none >output.log 2>&1 sed -i 's/\x1B\[[0-9;]*m//g' output.log python3 filter.py @@ -42,4 +47,4 @@ python3 filter.py cp output_filted.log result/ -f cd tools/ python tradestocsv.py -cd - +cd ../