OPEN-SOURCE SCRIPT
Fibonacci Zones and Rejections

This tool combines swing structure, Fibonacci retracements and candle-wick rejection logic to highlight high-probability reversal or continuation zones.
What it does
Tracks market structure automatically
Detects swing highs and swing lows based on a user-defined Structure Period.
Marks bullish shifts in structure and bearish shifts with CHoCH labels and Break of Structure (BoS) lines.
Optionally draws a dotted swing trend line between the active swing high and swing low and can show price labels at those swing points.
Draws dynamic Fibonacci retracements on the latest swing
Automatically anchors a Fibonacci retracement between the current swing high and swing low.
Lets you enable/disable individual Fibonacci levels and customize their values, colors and line width.
Can extend Fib levels forward to the latest bar and optionally keep previous Fib structures on the chart for context.
Optionally fills the “Golden Zone” (by default the first two levels, e.g. 0.50 and 0.618) so the core pullback area is visually obvious.
Defines an OTE / “Gold Zone” band from the active Fib levels
Uses the first two Fib lines (by default 0.50 and 0.618 or set another zone such as 61.8% to 78.6%) to form a live “Optimal Trade Entry” band.
Continuously updates this band as new structure forms and swings develop.
Detects rejection candles inside the Fib OTE band
Breaks each candle into upper wick, lower wick, body and total range.
A bullish rejection is a candle where:
Price trades into the OTE band,
The lower wick is a large portion of the bar’s range, and
The body is not tiny (minimum body-to-range ratio is configurable).
A bearish rejection is the mirror condition using the upper wick.
Only candles whose range overlaps the OTE band are considered; this filters for true reactions to the Fib zone.
Plots clear signals and alerts
Bullish OTE rejection is plotted as a large cross at the low of the candle.
Bearish OTE rejection is plotted as a large cross at the high of the candle.
Built-in alertcondition calls allow you to set alerts for:
Bullish OTE Rejection
Bearish OTE Rejection
Optional “debug” markers can show all raw rejection candles and all bars that sit inside the OTE band, to help you understand how the logic behaves.
Use cases
Identify pullback entries into the desired Fib zone after a clear structural move.
Confirm reversals or continuations using wick-based rejection inside a pre-defined Fib discount/premium zone.
Combine with your own higher-timeframe bias or ICT / SMC tools to refine entry timing around key levels.
What it does
Tracks market structure automatically
Detects swing highs and swing lows based on a user-defined Structure Period.
Marks bullish shifts in structure and bearish shifts with CHoCH labels and Break of Structure (BoS) lines.
Optionally draws a dotted swing trend line between the active swing high and swing low and can show price labels at those swing points.
Draws dynamic Fibonacci retracements on the latest swing
Automatically anchors a Fibonacci retracement between the current swing high and swing low.
Lets you enable/disable individual Fibonacci levels and customize their values, colors and line width.
Can extend Fib levels forward to the latest bar and optionally keep previous Fib structures on the chart for context.
Optionally fills the “Golden Zone” (by default the first two levels, e.g. 0.50 and 0.618) so the core pullback area is visually obvious.
Defines an OTE / “Gold Zone” band from the active Fib levels
Uses the first two Fib lines (by default 0.50 and 0.618 or set another zone such as 61.8% to 78.6%) to form a live “Optimal Trade Entry” band.
Continuously updates this band as new structure forms and swings develop.
Detects rejection candles inside the Fib OTE band
Breaks each candle into upper wick, lower wick, body and total range.
A bullish rejection is a candle where:
Price trades into the OTE band,
The lower wick is a large portion of the bar’s range, and
The body is not tiny (minimum body-to-range ratio is configurable).
A bearish rejection is the mirror condition using the upper wick.
Only candles whose range overlaps the OTE band are considered; this filters for true reactions to the Fib zone.
Plots clear signals and alerts
Bullish OTE rejection is plotted as a large cross at the low of the candle.
Bearish OTE rejection is plotted as a large cross at the high of the candle.
Built-in alertcondition calls allow you to set alerts for:
Bullish OTE Rejection
Bearish OTE Rejection
Optional “debug” markers can show all raw rejection candles and all bars that sit inside the OTE band, to help you understand how the logic behaves.
Use cases
Identify pullback entries into the desired Fib zone after a clear structural move.
Confirm reversals or continuations using wick-based rejection inside a pre-defined Fib discount/premium zone.
Combine with your own higher-timeframe bias or ICT / SMC tools to refine entry timing around key levels.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。