OPEN-SOURCE SCRIPT

Order Blocks Rejection Stats [RT]

2 751
This indicator identifies Order Blocks based on price action. It draws rectangular zones on the chart for visual identification and highlights bounces (rejections) within these zones. Additionally, it provides optional trade visualization with entry, stop-loss (SL), and take-profit (TP) lines based on user-defined filters, along with a performance summary table for backtesting purposes.
The logic is inspired by smart money concepts (SMC), focusing on pivot zones where price may reverse or continue.
Note that this is a technical tool for analysis only; it does not provide trading signals or guarantees any outcomes.

Key Features

Order Block Detection: Automatically detects and draws bullish (demand) and bearish (supply) order blocks using predefined price action setups.
Bounce Identification: Marks rejections (bounces) at order blocks with triangles for quick visual cues.
Trade Visualization: On bounces meeting filter conditions, plots entry (at close), SL (at block extremity or candle open), and TP (based on adjustable risk-reward ratio) lines. Lines extend until SL or TP is hit, with arrows indicating hits (green for TP, red for SL).
Filters: Includes a customizable moving average (MA) for trend confirmation (e.g., long above MA), time window for session-based trading, and optional SL adjustment to the bounce candle's open.
Performance Table: Displays wins, losses, and win rate in a table (for educational backtesting; not real-time trading results).
Customizable Colors and Sizes: User inputs for line colors and table text size.

Inputs and Settings

Delete Order Blocks After Fill: Removes blocks after price breaks through them.
Order Block Extension Length: Sets how far blocks extend (0 for infinite).
Moving Average Settings: Length, type (SMA/EMA/etc.), and source for trend filter.
Time Filter: Start/end hours/minutes to restrict entries to specific sessions.
Use Bounce Candle Open for SL: Moves SL to the open of the confirming candle.
Risk Reward Ratio: Adjusts TP distance relative to risk (default 1:1).
Line Colors: Separate colors for long/short entry, SL, and TP lines.
Table Text Size: Options from "tiny" to "huge" for the stats table.

How It Works

Block Formation: Scans for pivot setups (e.g., engulfing or break patterns) to create new blocks, queuing them for future retests.
Bounce Detection: When price overlaps a block and forms a reversal pattern, it's marked as a bounce.
Entry Conditions: Entries trigger on bounces above/below the MA and within the time window. Lines are drawn and extended dynamically.
Exit Tracking: Monitors if price hits TP (win) or SL (loss), updates the table, and stops line extension.
Table Update: Shows cumulative stats on the last bar for review.

This indicator can be used on any timeframe or asset for zone-based analysis. Experiment with settings to suit your chart.
Important Disclaimer
This is an educational tool and does not constitute financial advice. Trading involves risk, and past performance is not indicative of future results. Always conduct your own analysis and use proper risk management. The developer makes no representations about profitability or suitability for any trading strategy.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。