Field reference / patterns

pattern_bull_flag_state

Bull flag: a short, steep advance (the pole) that clears the prior range, then a tight consolidation, sideways or slightly down, that gives back only part of it. immature = a valid flag whose consolidation is still young; mature = the consolidation has run long enough and volume fits: heavy on the pole, lighter in the consolidation; invalidated = a mature flag failed within the last 3 bars, by a close below the consolidation's low or by giving back too much of the pole; not_detected otherwise. Uses the row's own bars, daily or weekly. Null with too little history.

LevelPer stock, ETF and coin, one value per date
Typestring (band)
Can be nullNo, whenever its section has data
Categorypatterns
Returned by/v1/history, /v1/search

Values

One of these, in order:

not_detected immature mature invalidated

Change markers

Every row also says how long this band has held its value and what it was before. Ask for these by name like any field. See Diff.

FieldTypeWhat it says
pattern_bull_flag_state_stabilitystring (band)How settled pattern_bull_flag_state is: volatile when it changed often in the last 30 days (12 weeks on weekly rows); otherwise fresh (just changed), holding, or established (unchanged for a long time).
pattern_bull_flag_state_periodsintegerDaily or weekly rows, including this one, that pattern_bull_flag_state has held its current value; 1 means it changed on this row.
pattern_bull_flag_state_flips_recent_countintegerHow many times pattern_bull_flag_state changed value in the last 30 days (12 weeks on weekly rows).
pattern_bull_flag_state_flips_lookbackstringThe window pattern_bull_flag_state_flips_recent_count covers: 30d on daily rows, 12w on weekly.
pattern_bull_flag_state_prevstring (band)The value pattern_bull_flag_state had before it changed, on the row where it changed (when _periods = 1); null otherwise.

Getting it

Its history for one ticker:

curl -G "https://api.tickerdb.com/v1/history" \ --data-urlencode 'tickers=AAPL' \ --data-urlencode 'fields=pattern_bull_flag_state' \ --data-urlencode 'start=2025-01-01' \ -H "Authorization: Bearer YOUR_API_KEY"

Stocks matching it today:

curl -G "https://api.tickerdb.com/v1/search" \ --data-urlencode 'filters=[{"field":"pattern_bull_flag_state","op":"eq","value":"not_detected"}]' \ --data-urlencode 'fields=["ticker","pattern_bull_flag_state"]' \ -H "Authorization: Bearer YOUR_API_KEY"

Every field, with its type and values, is also in /v1/schema/fields.