PROTECTED SOURCE SCRIPT

BEGGAL

25
Key Features and Concepts
1. Order Block (OB) Identification (Pivots)

The core of the indicator relies on Pivot Point detection (ta.pivothigh/ta.pivotlow) over a specified Pivot Length (e.g., 5 bars).

Bullish OB (Demand Zone): Identified at a valid low pivot point, with the zone boundary defined between the pivot low (low[length]) and the open/close average (hl2[length]) of the pivot bar.

Bearish OB (Supply Zone): Identified at a valid high pivot point, with the zone boundary defined between the pivot high (high[length]) and the open/close average (hl2[length]) of the pivot bar.

2. Advanced Strength Filters (Momentum & Volume)

The indicator applies strict filters to ensure only powerful, high-quality zones are drawn:

Momentum (ATR) Filter: Checks if the candle that created the OB has a range (high - low) greater than the Average True Range (ATR) multiplied by the Momentum Threshold. This filters for impulsive, strong candles.

Volume Imbalance Filter (SMC Confirmation): If enabled, it requires the volume of the OB-creating candle to be higher than the volume of candles surrounding it (checked over the Volume Imbalance Lookback period). This confirms institutional activity in the zone creation.

Structure Break Filter (BOS/CHoCH): If enabled, the OB is only considered valid if it is created after a Break of Structure (BOS) or Change of Character (CHoCH). This validates the zone according to market structure rules (e.g., a Bearish OB must be preceded by a break of a significant swing low).

3. Dynamic Zone Management

Zone Narrowing (enable_narrowing): This feature dynamically adjusts the boundaries of an Order Block after it has been touched. If a candle wick tests the zone without fully mitigating it, the zone boundary is moved inward to the point where the test occurred, narrowing the zone and making it a more precise entry point (Dynamic OB concept).

Mitigation/Removal: Once price action (either the candle's wick or close, based on the Mitigation Method setting) breaches the outermost boundary of the zone, the Order Block is considered mitigated (broken) and is removed from the chart to clear clutter.

4. Risk Categorization

The indicator tracks and draws up to a user-defined number of OBs (Bullish/Bearish OB Count). These are categorized by their index:

Index 0 (Closest): Categorized as High Risk Zone.

Index 1: Categorized as Medium Risk Zone.

Index 2 and beyond: Categorized as Low Risk Zone. The user can toggle the visibility for each of these risk categories.

5. Integrated Risk/Reward (RR) Setup

For the High Risk Zone (Index 0), once the zone is touched, the indicator displays a complete trade setup:

Entry: Assumed at the Average Price of the Order Block.

Stop Loss (SL): Placed at the protective boundary of the OB (the top for a Sell Zone, the bottom for a Buy Zone). The risk area is colored with the RR Risk Zone Background.

Take Profit (TP): Calculated based on the user-defined Risk/Reward Ratio (e.g., 2.0 for 1:2 RR). The reward area is colored with the RR Reward Zone Background.

The RR boxes and price labels (TP/SL) are drawn with a configurable RR Box Width (Bars).

6. Alerts

The indicator includes built-in Pine Script alerts that trigger when the price enters an unmitigated zone, notifying the user of the Risk Level (High, Medium, or Low), the zone's boundaries, and the price.

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。