Regler
// Step 1: The 3-month Flagpole
roc({60d}) > 20;
// Step 2: Tight Consolidation (The Pennant)
// Using ATR (Average True Range) to find declining volatility/tightening range
// This confirms the "pennant" is narrowing
atr({5d}) < atr({20d});
// Step 3: Current Price Proximity
// Ensures we are still near the highs of the flagpole move
Price > Price{10d} * 0.95;
// Step 4: Volume Contraction
// volume must be lower than it was during the initial surge
Volume < Volume{10d};
// Step 5: Trend Confirmation
Price > sma({50d});
// Step 6: Constraints
MarketCap > 100M;
order by MarketCap desc;
limit 50;