Break of Structure (BOS) and Change of Character (CHoCH) Labels
Many price-action traders describe a trend through its swings. In an up-trend price makes higher highs and higher lows; in a down-trend it makes lower highs and lower lows. Two events are watched closely:
The indicator measures this objectively:
The first break after the start only defines the initial trend and receives no label, because there is no previous trend to compare with.
All calculations use closed bars only, so labels do not repaint. The indicator keeps its market-structure state between calls; at start it scans a limited number of bars, and after that every new closed bar is processed once. The full history is never rescanned.
| Input | Default | Purpose |
|---|---|---|
| Structure | ||
| InpSwingBars | 3 | Number of bars on each side of a swing (1 to 20). Larger values give fewer, more significant swings |
| InpBreakMode | BREAK_CLOSE | How a swing is broken: BREAK_CLOSE (a bar must close beyond it) or BREAK_WICK (a High or Low beyond it is enough) |
| InpLookbackBars | 500 | Number of bars scanned when the indicator starts (30 to 5000) |
| InpMaxLabels | 40 | Maximum number of breaks kept on the chart; the oldest is removed first (1 to 300) |
| Display | ||
| InpShowBos | true | Show BOS labels |
| InpShowChoch | true | Show CHoCH labels |
| InpBosColor | clrWhite | Color of BOS lines and labels |
| InpChochColor | clrSilver | Color of CHoCH lines and labels |
| InpBosStyle | STYLE_DASH | Line style of BOS |
| InpChochStyle | STYLE_DOT | Line style of CHoCH |
| InpLineWidth | 1 | Line width (1 to 5). Dash and dot styles are drawn only with width 1 |
| InpFontSize | 9 | Label font size (6 to 20) |
| Alerts | ||
| InpAlertNew | false | Show an alert when a BOS or CHoCH is confirmed on a closed bar |

Fig. 1. BosChochLabels on an M15 chart with default settings: BOS (dashed) and CHoCH (dotted) labels (black and white image per Code Base guidelines).
Fair Value Gap (FVG) Detector with Auto-Removal When Filled
Detects bullish and bearish Fair Value Gaps (three-candle price imbalances), draws them as boxes extending to the right and automatically removes each box once the price fills the gap.
Order Block Marker with Mitigation Tracking
Marks bullish and bearish order blocks (the last opposite candle before a strong impulse) and tracks their state: fresh, mitigated when price returns, and removed when broken.
Premium and Discount Zones Based on the Current Swing Range
Splits the current swing range (last swing high to last swing low) into a Premium zone above 50% and a Discount zone below 50%, with an equilibrium line and a live label that shows where the price is inside the range.
Currency Strength Ranking Panel
A panel that ranks the eight major currencies (USD, EUR, GBP, JPY, AUD, NZD, CAD, CHF) by their average rate of change against each other.