Skip to content
StatAlphaDocumentation

BOS — Break of Structure

The Break of Structure (BOS) identifies moments when the market shifts its structural trend —
for example, when a new Higher High breaks a prior swing high, or a Lower Low breaks below the previous swing low.
It is used to evaluate trend continuation, reversals, and the strength of structural breakouts.


BOS events mark the moment price action breaks an existing structure level, indicating a possible change or continuation of market regime.

  • Bullish BOS: Price breaks above a previous swing high following a higher low (HL → HH).
  • Bearish BOS: Price breaks below a previous swing low following a lower high (LH → LL).
  • Each BOS is tracked for up to 5 days to evaluate follow-through and retracement behavior.

These statistics help quantify structure-based opportunities instead of relying purely on visual chart analysis.


Parameter Type Description
symbol string Symbol for the analyzed asset (e.g. AAPL, BTCUSD)
start_date / end_date string Defines the custom date range for analysis (format YYYY-MM-DD)
time_window string Predefined relative range (e.g. 1M, 3M, 12M, 24M, 5Y). Ignored if explicit dates are provided.
bos_minutes integer Bar resolution for structure detection (default 5)
pivot_bars integer Number of bars left/right used to detect pivot highs/lows (default 2)
use_close boolean Use close prices (true) instead of highs/lows for BOS detection
start_time / end_time string Optional: Restrict analysis to intraday hours (e.g. 13:30 → 20:00)
include_raw_data boolean When true, includes raw BOS event records in response

Terminal window
curl -s \
-H "Authorization: Bearer $ACCESS_TOKEN" \
"https://api.statalpha.io/stats/bos?symbol=AAPL&time_window=12M&bos_minutes=15&pivot_bars=2&use_close=true"
{
"symbol": "AAPL",
"timeframe": "15min",
"summary": {
"total_bos_count": 384,
"bullish_count": 192,
"bearish_count": 192,
"success_rate": 63.4,
"avg_bos_range": 1.82,
"avg_relative_follow_through_pct": 42.7,
"avg_bos_duration_seconds": 58200
},
"parameters": {
"pivot_bars": 2,
"use_close": true,
"time_window": "12M"
}
}

Metric Meaning
success_rate Percentage of BOS patterns that achieved a meaningful follow-through without retracement failure
avg_bos_range Average price distance between BOS level and swing extreme
avg_relative_follow_through_pct Average follow-through as % of BOS range
avg_bos_duration_seconds Average time a BOS pattern remained active
retrace_50_pct_share Share of BOS events where retracement exceeded 50% of the BOS range
bullish_success_rate / bearish_success_rate Directional performance comparison

  • /stats/bos — Returns aggregated BOS statistics summary
  • /stats/bos/raw — Returns all detected BOS events including metadata
  • /stats/bos/doc — Returns field documentation for both endpoints