OPEN-SOURCE SCRIPT

Enhanced Roman Order Block v2

72
Enhanced Roman Order Block Indicator v2

This indicator identifies and visualizes Order Blocks (OBs) on your chart, which are key price zones where institutional traders likely placed significant orders, often acting as support/resistance. It's an enhanced version inspired by standard OB detection scripts (like "Crystal Order Block"), but combines and improves upon them with practical features for better trading utility—avoiding a simple mashup by integrating complementary tools that work synergistically.
Originality and Enhancements:

Builds on basic candle-pattern OB detection but adds ATR-based minimum size filtering to ignore noise (e.g., small, insignificant blocks).
Includes optional Higher Timeframe (HTF) confirmation to validate OBs against larger trends, using confirmed data only (no lookahead bias—requests are offset for historical accuracy).
Customizable mitigation (wick or close-based) to detect when an OB is "touched" and potentially invalidated.
Adjustable lookback for pattern flexibility, box extensions, price lines, max displayed OBs (to declutter charts), and alerts for formation/mitigation.
These features merge to create a more reliable, user-configurable tool: e.g., HTF checks + ATR filters reduce false positives, while alerts + lines help in live trading without overwhelming the chart.

How It Works:

Detection Logic: Scans recent candles (default lookback=3) for bullish OBs (e.g., a low that's lower than prior but higher than subsequent swings, indicating accumulation) or bearish OBs (opposite for distribution). Formulas: Bullish = (B_low < A_low) AND (C_low > B_low) AND ((C_low > B_high) OR (D_low > B_high)); similar for bearish.
Filters: OBs must exceed ATR * minOBSizeATR (default 0.5) for validity. If HTF enabled, confirms the OB aligns with HTF lows/highs.
Mitigation: Tracks OBs and shortens boxes/lines when price wicks/closes into the mitigation level (top for bullish, bottom for bearish).
Display: Draws semi-transparent boxes (extendable), optional dashed lines, and labels. Limits to maxOBs, removing oldest.
Alerts: Triggers on new OBs or mitigations for timely notifications.
Underlying concept: OBs stem from Smart Money Concepts (SMC), where big players leave "footprints" in price structure— this script automates detection with risk-aware tweaks.

How to Use:

Add to chart (works on any timeframe/symbol, e.g., crypto like ETHUSD).
Inputs:

Order Block Settings: Toggle bullish/bearish/mitigated visibility; choose mitigation type; set min size/lookback.
Display: Adjust extensions, enable lines, limit max OBs.
Alerts: Enable for OB events.
Multi-Timeframe: Input a higher TF (e.g., "D" for daily) for confirmation—ensures OBs respect bigger-picture levels.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。