#!/bin/bash
# [2026-09-27] entry_rules + "volume rising over 5 bars" (slope, then strict), after the baseline run finishes
cd /var/www/screener/trade1
until grep -q "^TOTAL" sim/entry_rules_21d.log; do sleep 30; done
python3 simulate.py --days all --rules-dir sim/rules --exit hold_exit --max-positions 99 --equity 8807.72 --name entry_rules_21d_vol5slope \
  --set entry_rules.rules.volume_rising_bars=5 --set 'entry_rules.rules.volume_rising_mode="slope"' > sim/entry_rules_21d_vol5slope.log 2>&1
python3 simulate.py --days all --rules-dir sim/rules --exit hold_exit --max-positions 99 --equity 8807.72 --name entry_rules_21d_vol5strict \
  --set entry_rules.rules.volume_rising_bars=5 --set 'entry_rules.rules.volume_rising_mode="strict"' > sim/entry_rules_21d_vol5strict.log 2>&1
echo VOLRULE_DONE >> sim/entry_rules_21d_vol5strict.log
