OPEN-SOURCE SCRIPT
Direction via Zone Break [by rukich]

🟠OVERVIEW
The indicator shows the direction of movement and zones: SSL, BSL, FVG.
Zones serve as support/resistance and as validation/invalidation of a movement reversal.
🟠COMPONENTS
The direction of movement is built based on a three-candle swing high (BSL) and swing low (SSL) pattern. If swing high (BSL) and swing low (SSL) are formed, and then an internal swing high/low is formed (depending on the direction of movement), then in case the initial movement continues — for example, in an upward movement — the new swing low (SSL) will be the minimum before the update, i.e., the internal low, while the swing high (BSL) will be formed according to the three-candle pattern.

A change of direction is considered when a candle closes beyond the key swing high/low (BSL/SSL), depending on the direction of movement. For example, in an upward movement, a break occurs when a candle closes beyond the swing low (SSL). After that, the swing high (BSL) will be the nearest fractal (swing high), and the swing low (SSL) will be formed according to the three-candle pattern.

All the above logic also applies to downward movements.
Within each movement, there can be FVG zones, which can act as support/resistance or indicate weakness in the movement direction.
Note: if the movement is upward, only bullish FVG+ will be displayed; if the movement is downward, only bearish FVG- will be displayed.

Weakness of movement direction.
For example, consider an upward impulse with the nearest FVG+ zone. If the price closes beyond the lower boundary of the zone, it will be considered invalidated (inv. FVG-), which in turn indicates weakness in the movement direction and a possible local short, which may subsequently lead to a break of the entire movement.

🟠HOW TO USE
There are only two visual settings in the configuration:
On the chart, the following are displayed:
🟠CONCLUSION
The indicator helps determine the current movement with zones for trading in the direction, and also indicates movement weakness through invalidation of the nearest zones.
The indicator shows the direction of movement and zones: SSL, BSL, FVG.
Zones serve as support/resistance and as validation/invalidation of a movement reversal.
🟠COMPONENTS
The direction of movement is built based on a three-candle swing high (BSL) and swing low (SSL) pattern. If swing high (BSL) and swing low (SSL) are formed, and then an internal swing high/low is formed (depending on the direction of movement), then in case the initial movement continues — for example, in an upward movement — the new swing low (SSL) will be the minimum before the update, i.e., the internal low, while the swing high (BSL) will be formed according to the three-candle pattern.
A change of direction is considered when a candle closes beyond the key swing high/low (BSL/SSL), depending on the direction of movement. For example, in an upward movement, a break occurs when a candle closes beyond the swing low (SSL). After that, the swing high (BSL) will be the nearest fractal (swing high), and the swing low (SSL) will be formed according to the three-candle pattern.
All the above logic also applies to downward movements.
Within each movement, there can be FVG zones, which can act as support/resistance or indicate weakness in the movement direction.
Note: if the movement is upward, only bullish FVG+ will be displayed; if the movement is downward, only bearish FVG- will be displayed.
Weakness of movement direction.
For example, consider an upward impulse with the nearest FVG+ zone. If the price closes beyond the lower boundary of the zone, it will be considered invalidated (inv. FVG-), which in turn indicates weakness in the movement direction and a possible local short, which may subsequently lead to a break of the entire movement.
🟠HOW TO USE
There are only two visual settings in the configuration:
- Show previous SSL/BSL – enables/disables the display of all previous SSL/BSL zones
- Show Bullish/Bearish trend – enables/disables background shading between SSL and BSL for visual understanding of the movement direction
On the chart, the following are displayed:
- Labels with current SSL/BSL
- FVG+- / inv. FVG+- zones, for trading in the movement direction
- In case the nearest FVG is invalidated, a label will appear with the text: Weak bullish/bearish & local short/long (this is not a signal, but only indicates the probability of a potential move based on the weakness of the nearest zone)
🟠CONCLUSION
The indicator helps determine the current movement with zones for trading in the direction, and also indicates movement weakness through invalidation of the nearest zones.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.