added gap detection after august 14 loss.
been running it 4 days.
already proving useful.
the filter logic #
skip trading if:
- market gaps >1% at open
- within 2 hours of gap open
- regardless of vol detection status
reasoning: gaps create new price ranges. entering against gap momentum = fighting tape.
implementation #
async def check_gap_filter(self, symbol: str) -> bool:
"""Check if gap is too large to trade"""
# Get today's open and yesterday's close
today_open = await self.get_today_open(symbol)
yesterday_close = await self.get_yesterday_close(symbol)
# Calculate gap %
gap_pct = abs((today_open - yesterday_close) / yesterday_close)
if gap_pct > 0.01: # 1% gap threshold
# Check time since open
market_open_time = self.get_market_open_time()
current_time = datetime.now()
hours_since_open = (current_time - market_open_time).seconds / 3600
if hours_since_open < 2:
logger.warning(f"BLOCKED: {symbol} - gap {gap_pct:.2%}, only {hours_since_open:.1f}h since open")
return False
return True
this week’s saves #
monday 8/14: (the loss that triggered this filter)
- 1.2% gap up at open
- entered at 10:30am (1 hour after open)
- lost -$360
- with new filter: would’ve been blocked
wednesday 8/16:
- 1.4% gap down at open
- filter blocked SPX entry at 10:45am
- position would’ve stopped: -$340
- saved: $340
friday 8/18:
- 1.1% gap up at open
- filter blocked QQQ entry at 11:00am
- position would’ve stopped: -$295
- saved: $295
total saved in 4 days: $635 (would’ve been $995 if counted original loss)
tradeoff analysis #
blocked trades: 3
- 2 would’ve lost: -$635
- 1 would’ve won: +$280
net benefit: +$355
worth it.
filter stack growing #
current entry filters (all must pass):
- vol detection (blocks elevated/spike regimes)
- correlation limit (max 2 equity positions)
- time-of-day (skip first 30 min)
- gap detection (skip 2h after >1% gap)
each filter removes bad trades.
stacking them = higher win rate.
august week 4 preview #
week 1: +$2,065 week 2: +$1,805 week 3: +$1,705 current: +$5,575
need $425 more to hit $6k august.
1 week left. easy.
momentum strategy #
continuing at 0.5% risk.
total momentum trades: 4 (all wins)
win rate: 100% (4/4)
profit factor: infinite (no losses yet)
obviously not sustainable but good start.
account status #
start august: $351,145 current aug 18: $356,720 gain: +$5,575 (+1.59%)
2:52pm friday. gap filter working. saved $635 in first 4 days. filter stack preventing bad trades. august continues strong.
-AK