#!/bin/bash
# [2026-10-03] bot alone with the NEW exit (smooth_arm 0.7), same every-signal replay as entry1002_live
cd /var/www/screener/trade
T=/var/www/screener/trade/reports/open_window/tick20
BASE="--max-positions 99 --entry-v2 --exit-v2 --xv2-set trail=false --xv2-set climax_exit=true --xv2-set smooth_arm=0.7 --reentry-after-loss above_entry"
for d in $(ls $T/cands/ | sed 's/.json//' | awk '$1>="2026-08-27" && $1<="2026-09-30"' | sort); do
  G=""; [ $d = 2026-09-22 ] && G="--synthetic-grid"
  nice -n 5 python3 simulate.py --date $d $BASE $G --candidates-file $T/cands/$d.json > $T/out/entry1003_arm07_$d.out 2>&1
  echo "$d $(grep 'total:' $T/out/entry1003_arm07_$d.out)" >> reports/arm07_entries_1003.log
done
echo ALLDONE >> reports/arm07_entries_1003.log
