OPEN-SOURCE SCRIPT

OSOM Trend

323
How to Use the OSOM Breakers Indicator
The OSOM Breakers indicator is a customizable overlay tool for TradingView (Pine Script v5) that identifies market structure patterns, breakouts, breakers (order blocks), and price targets based on pivots, higher highs/lows (HH/LL), and breaks of structure (BoS/MSB). It helps visualize bullish/bearish trends, potential reversals, and target levels, with a focus on institutional "order blocks" (OB) for support/resistance. The indicator supports alerts indirectly through plotted events and is optimized for volatile markets like forex, crypto, or indices.
1. Adding the Indicator to Your Chart

Open TradingView (tradingview.com) and load a chart for your desired asset.
Click the "Indicators" button at the top.
Search for "OSOM Breakers" (if community-shared) or add via Pine Editor:
Open the Pine Editor tab at the bottom.
Paste the provided code (from //version=5 to the end).
Click "Save" and name it (e.g., "OSOM Breakers").
Click "Add to Chart".

The indicator overlays on your chart with defaults like dashed zigzag lines, HH/LL labels, and green/red colors for bull/bear elements.

2. Configuring Inputs

Click the gear icon next to the indicator name in the legend to access settings.
Inputs are grouped:
Nephew_Sam Market Structure Settings: Pivot strength (default 5; higher for smoother, lower for sensitivity). Toggles for zigzag lines, BoS lines, HH/LL labels, and pattern matches.
Nephew_Sam Bull/Bear Patterns: Pre-defined sequences (e.g., "LL,LH,LL,HH,HL" for bull patterns) with text labels (e.g., "BOS HL 1") and toggles. Customize up to 7 per direction for specific setups like BOS (break of structure) or MSS (market structure shift).
Nephew_Sam Styles: Colors for HH/LL (green up, red down), labels, zigzag style (dashed/dotted), and width (1-4).
Market Structure Break Targets Settings: Max duration (250 bars), calculation method (Percent or ATR), ATR multiplier (2.0). Enable/disable bull/bear MSB/BoS, set colors (green/red), and % targets (100% default).
Breakers Settings: Max breaks (1; increase for stricter breaker confirmation), max duration (1000 bars). Colors for bullish MS (green), bull breaker (red), bearish MS (red), bear breaker (green).

Defaults suit 15m-1h charts; reduce pivot strength for scalping (1m-5m) or increase for daily+. Test patterns on historical data to match your strategy.

3. Interpreting the Visuals and Signals

Zigzag and HH/LL Labels:
Dashed/dotted lines connect pivots; green for upswings, red for downswings (if enabled).
Labels like "HH" (higher high), "LH" (lower high), "LL" (lower low), "HL" (higher low) appear at pivots. Green for bullish, red for bearish.

Pattern Matches:
Labels (e.g., "BOS HL 1") at pivots when sequences match user-defined bull/bear conditions. Up arrows for bull, down for bear.
Use for spotting reversals or continuations (e.g., bull pattern after downtrend signals potential long).

Market Structure Breaks (MSB/BoS):
Solid lines: Green for bullish MSB/BoS (break above prior high), red for bearish (break below prior low).
Labels: "MSB" or "MSS" (shift) at breaks, "BoS" for breaks of structure.
Boxes: Translucent green/red "OB" (order block) boxes highlight ranges before breaks – potential support (post-bull break) or resistance (post-bear).

Targets:
Dotted horizontal/vertical lines extend from breaks to projected targets (percent of range or ATR-based).
Active until hit or expired (after max duration). Green for bull targets (above), red for bear (below).

Breakers:
Dotted lines: Recent MSB/BoS levels that act as breakers (e.g., red dotted for bull breaker).
Plotted shapes: "▲" (green below bar) for bull MSB breakout, "▼" (red above) for bear.
Candle borders: Green for support events (price tests breaker from above), red for resistance (from below).

Overall Direction: Tracks bullish (1) or bearish (-1) based on recent breaks; use for trend bias.

4. Trading Strategies

Breakout Trading: Enter long on green "▲" (bull breakout) above MSB/BoS lines; short on red "▼" below. Target dotted lines (e.g., 100% of prior range).
Order Block (OB) Plays: Buy at green OB boxes (support after bull break), sell at red (resistance after bear). Confirm with support/resistance events.
Pattern-Based Reversals: Long on bull patterns (e.g., "BOS HL") after bearish structure; short on bear patterns. Filter with HH/LL (e.g., HH after LL signals uptrend).
Trend Continuation: In bullish direction, stack longs on BoS breaks; use breakers as trailing stops.
Risk Management: Stops below recent LL (longs) or above HH (shorts). Position size based on ATR (from targets). Avoid choppy markets by disabling patterns.
Timeframes: Scalping (1m-15m with low pivot strength), swing (1h-4h), position (daily with higher strength). Combine with volume indicators for confirmation.

5. Alerts and Automation

No built-in alertcondition(); set manual alerts in TradingView:
Right-click chart > Add Alert > Condition (e.g., "OSOM Breakers - Bull MSB Breakout" crosses 1 for "▲").
Or alert on close crossing MSB/BoS lines (use indicator plots as conditions).

For strategies: Convert to a strategy script by adding strategy() entries/exits based on breaks/patterns.

6. Tips and Best Practices

Asset Suitability: Ideal for trending markets (e.g., BTC/USD, EUR/USD). Less effective in ranging; toggle off zigzag/boxes to reduce clutter.
Performance: Limits (500 lines/boxes/labels) prevent overload; delete oldest automatically. Backtest on replay mode.
Customization: Add custom patterns (e.g., for ICT/SMC concepts like fair value gaps). Match colors to your theme.
Limitations: Relies on pivots – false signals in low-volatility; no volume integration (pair with another indicator). Targets are projections, not guarantees.
Enhancements: Combine with OSOM Trend for volume confirmation. Practice on demo charts.

This indicator provides a structured view of price action, emphasizing breaks and targets for systematic trading. Always validate with multiple timeframes and risk controls.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.