OPEN-SOURCE SCRIPT
Orderblocks & Breakers

This indicator identifies potential orderblocks and breakers based on recent swing highs and lows. It is built to offer a structured, customizable, and noise-controlled view of how price interacts with supply and demand levels.
The script applies pivot-based swing detection to identify swing highs and lows.
Bullish Orderblocks: The script Identifies and stores the last down candle before a swing high is breached and confirms and plots the orderblock with a market structure break (close above the swing high).
Bearish Orderblocks: The script Identifies and stores the last up candle before a swing low is breached and confirms and plots the orderblock with a market structure break (close below the swing low).
When price later closes through an existing orderblock, it is reclassified as a Breaker and recolored accordingly. (all colors can be changed in the settings)
What Makes It Different
Unlike most orderblock tools that simply mark every swing-based block, this version introduces:
1. Chop Control – automatically hides breakers that price repeatedly closes through (2 closes after the orderblock becomes a breaker), keeping only relevant zones visible.
2. Recent Block Filtering – limits how many of the recent orderblocks or breakers are displayed, preventing chart clutter.
3. Dynamic Updating – orderblocks automatically convert to breakers when price closes beyond them, with clear color changes.
These features make it easier to study cleaner price structure without manually managing old or invalid zones. The optional Chop Control filter can reduce overlapping or repeatedly invalidated zones to keep the chart clearer.
Customizable Parameters
- Swing detection length (shorter means more aggressive pivot detection, longer means less aggressive so less highs/lows detected)
- Number of recent blocks to display
- Visibility toggles for orderblocks or breakers
- Color and transparency controls for each type
Alerts
Alerts can be set to trigger when price tests any defined zone.
Purpose
This indicator is designed as a price structure visualization and study tool.
It may assist in understanding how price interacts with previously active regions, but it does not produce signals or trade recommendations.
The script applies pivot-based swing detection to identify swing highs and lows.
Bullish Orderblocks: The script Identifies and stores the last down candle before a swing high is breached and confirms and plots the orderblock with a market structure break (close above the swing high).
Bearish Orderblocks: The script Identifies and stores the last up candle before a swing low is breached and confirms and plots the orderblock with a market structure break (close below the swing low).
When price later closes through an existing orderblock, it is reclassified as a Breaker and recolored accordingly. (all colors can be changed in the settings)
What Makes It Different
Unlike most orderblock tools that simply mark every swing-based block, this version introduces:
1. Chop Control – automatically hides breakers that price repeatedly closes through (2 closes after the orderblock becomes a breaker), keeping only relevant zones visible.
2. Recent Block Filtering – limits how many of the recent orderblocks or breakers are displayed, preventing chart clutter.
3. Dynamic Updating – orderblocks automatically convert to breakers when price closes beyond them, with clear color changes.
These features make it easier to study cleaner price structure without manually managing old or invalid zones. The optional Chop Control filter can reduce overlapping or repeatedly invalidated zones to keep the chart clearer.
Customizable Parameters
- Swing detection length (shorter means more aggressive pivot detection, longer means less aggressive so less highs/lows detected)
- Number of recent blocks to display
- Visibility toggles for orderblocks or breakers
- Color and transparency controls for each type
Alerts
Alerts can be set to trigger when price tests any defined zone.
Purpose
This indicator is designed as a price structure visualization and study tool.
It may assist in understanding how price interacts with previously active regions, but it does not produce signals or trade recommendations.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน