mirror of
https://github.com/artemium428/428-backtester.git
synced 2026-09-15 18:36:20 +00:00
Ship SampleStrategy and Integral workflow scripts without proprietary V15 logic, Pine, or run results. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
827 B
Bash
Executable file
32 lines
827 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# shellcheck disable=SC1091
|
|
source "$(dirname "$0")/_env.sh"
|
|
|
|
TIMERANGE="${TIMERANGE:-20250101-20250201}"
|
|
PAIR="${PAIR:-BTC/USDT:USDT}"
|
|
STRATEGY="${STRATEGY:-SampleStrategy}"
|
|
|
|
mkdir -p user_data/plot
|
|
|
|
echo "==> plot-profit (equity curve)"
|
|
freqtrade plot-profit \
|
|
--config user_data/config.json \
|
|
--strategy "${STRATEGY}" \
|
|
--timerange "${TIMERANGE}" \
|
|
--timeframe 15m \
|
|
"$@"
|
|
|
|
echo "==> trade chart (price / signals / SL·TP / fills / volume)"
|
|
PYTHON_BIN="${ROOT}/.venv/bin/python"
|
|
if [[ ! -x "${PYTHON_BIN}" ]]; then
|
|
PYTHON_BIN="python3"
|
|
fi
|
|
"${PYTHON_BIN}" "$(dirname "$0")/plot_trades_chart.py" \
|
|
--config user_data/config.json \
|
|
--strategy "${STRATEGY}" \
|
|
--pair "${PAIR}" \
|
|
--timerange "${TIMERANGE}" \
|
|
--timeframe 15m
|
|
|
|
echo "HTML plots are under user_data/plot/"
|