PROTECTED SOURCE SCRIPT
Updated Vasyl Ivanov | Order Blocks

Order Blocks Indicator for Long-Term Traders and Scalpers
This indicator is designed to identify order blocks (OBs) across multiple timeframes, offering flexible and adaptable detection mechanisms for both strong and weaker price movements.
Key Features:
How It Works:
This indicator detects key price zones based on order block patterns, which are often followed by significant price moves. By analyzing these blocks across multiple timeframes, it helps traders identify potential reversal areas and support/resistance zones more effectively.
Use Cases:
Scalping: Scalpers can benefit from the rapid detection of short-term OBs to make quick decisions based on high-probability setups.
Long-Term Trading: Longer-term traders can use the multi-timeframe feature to spot higher timeframe OBs while trading lower timeframes, allowing for better alignment with major market movements.
Why It’s Unique:
Unlike other OB indicators, this one combines multi-timeframe detection with customizable OB sizing, extremum detection, and color-coding for clear differentiation between timeframes. Its backtest feature enhances historical analysis, providing a comprehensive toolkit for traders aiming to improve decision-making.

This indicator is designed to identify order blocks (OBs) across multiple timeframes, offering flexible and adaptable detection mechanisms for both strong and weaker price movements.
Key Features:
- Flexible OB Detection:
Detects order blocks with 3 candles during strong movements.
Detects order blocks with 4 candles during weaker movements.
Identifies the highest or lowest extremum between the 1st and 2nd candles to define the starting point of the OB, ensuring accuracy in ranging and trending markets.
In cases where the 2nd candle's extremum is the highest/lowest, the OB size adjusts accordingly. - Multi-Timeframe Analysis:
This indicator enables seamless multi-timeframe order block analysis, removing the need to manually switch between timeframes.
Timeframe mapping:
For intraday and lower timeframes:
< 5 min maps to 30 min
<= 15 min maps to 1 hour
<= 1 hour maps to 4 hours
All other intraday maps to 1 day
Daily charts and higher map to 1 week
This automatic adjustment lets you view both current and parent timeframe order blocks without hassle. - Customizable Backtest Analysis:
The indicator includes a "Show/Hide Overlapped Order Blocks" feature, allowing you to hide order blocks that have already been overlapped. This feature aids in backtesting and historical analysis by offering a cleaner view of how past price action interacted with detected blocks.
[Consider adding a screenshot demonstrating the “Show/Hide Overlapped OB” feature here.] - Color Differentiation by Timeframe:
Customize different colors for local and parent timeframes to easily differentiate order blocks from various timeframes at a glance. - Candle Wicks Customization:
The 'Use Candle Wicks' option allows you to include or exclude candle wicks in OB detection, giving you flexibility in how the blocks are drawn based on your trading style.
How It Works:
This indicator detects key price zones based on order block patterns, which are often followed by significant price moves. By analyzing these blocks across multiple timeframes, it helps traders identify potential reversal areas and support/resistance zones more effectively.
Use Cases:
Scalping: Scalpers can benefit from the rapid detection of short-term OBs to make quick decisions based on high-probability setups.
Long-Term Trading: Longer-term traders can use the multi-timeframe feature to spot higher timeframe OBs while trading lower timeframes, allowing for better alignment with major market movements.
Why It’s Unique:
Unlike other OB indicators, this one combines multi-timeframe detection with customizable OB sizing, extremum detection, and color-coding for clear differentiation between timeframes. Its backtest feature enhances historical analysis, providing a comprehensive toolkit for traders aiming to improve decision-making.
Release Notes
Improved orderblocks' detection on parent timeframesRelease Notes
Improved performance issuesRelease Notes
Improved calculations speedRelease Notes
Fixed runtime errorRelease Notes
Added 4 additional higher timeframes. You can customize color style for each one at your ownRelease Notes
Improved bearish OB detectionRelease Notes
Improved multi-timeframe calculations for long periodsRelease Notes
- Improved detection method- Added the 'OB Validity Distance' limit
Release Notes
Improved Order blocks detection by searching for the following imbalanceRelease Notes
Fixed a bug for historical barsRelease Notes
Improved OB detection after the price rejectionRelease Notes
Fix color's alpha for overlapped order blocksRelease Notes
Added Internal BoSRelease Notes
Updated algorithm to detect order blocks bar index by the lowest/highest extremumRelease Notes
Improved distance on which to hide FVGs and order blocksRelease Notes
fixed script errorRelease Notes
Fixed another code issueRelease Notes
Increased the number of visible FVGsRelease Notes
Improved efficiencyRelease Notes
Prevent calculations out of barstate.isconfirmedRelease Notes
Fixed error for history barsRelease Notes
Improved extremums detectionRelease Notes
One more fix for extremums detectionRelease Notes
improved searching of a first extremumProtected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.