Backtest UI

Ascending flag structure T204

T_ASCENDING_FLAG_STRUCTURE_20D | ascending flag | trigger | ticker | candidate

LogicRecent 5D low > Prior 15D low AND Close position in 20D base >= 0.50 AND 20D base range <= 35% AND Distance from prior 20D high in ATR between -1.0..0.5 ATR AND Close > 50D SMA
Edge-
Samples0

Definition

Higher recent low (last 5 sessions above prior 15), close in upper half of 20-day base, base range <= 35%, close within [-1.0, +0.5] ATR of prior 20-day high, and close above 50-day SMA.

Logic Triples

PredicateLeftOpRightFormula
Recent low above prior 15D lowThe lowest low in the last 5 sessions is above the lowest low in the prior 15-session window. Recent 5D low > Prior 15D low min(low[t-4:t]) > min(low[t-19:t-5])
Close in upper half of 20D baseCurrent close is in the upper half of the 20-day high-low base. Close position in 20D base >= 0.50 (close[t] - min(low[t-19:t])) / (max(high[t-19:t]) - min(low[t-19:t])) >= 0.5
20D base range no more than 35%The 20-day high-low base range is not excessive. 20D base range <= 35% max(high[t-19:t]) / min(low[t-19:t]) - 1 <= 0.35
Close near prior 20D high in ATR unitsClose is within 1 ATR below the prior 20-day high and no more than 0.5 ATR above it. Distance from prior 20D high in ATR between -1.0..0.5 ATR (close[t] - max(high[t-20:t-1])) / atr20 between -1..0.5
Close above 50D SMATicker closes above its 50-day simple moving average. Close > 50D SMA close[t] > sma(close, 50)[t]

Strategies Using Atom

StrategyFamilyEdgeSignals
Ascending flag structure, 21D ascending_flag - -