OPEN-SOURCE SCRIPT
ที่อัปเดต: OBV Trend Candles

OBV Trend Candles
This indicator colors your candles based on the relationship between On-Balance Volume (OBV) and a moving average of OBV. It's a simple way to keep volume-based trend context visible directly on the price chart, without having to watch a separate OBV pane.
How it works
OBV accumulates volume on up-closes and subtracts it on down-closes, so a rising OBV means volume is flowing into the asset and a falling OBV means it's flowing out. This script takes that OBV line and compares it to a simple moving average of itself:
When OBV is above its SMA, volume momentum is building → candles are painted green.
When OBV is below its SMA, volume momentum is fading → candles are painted red.
The idea is that volume often shifts before or alongside price, so the color flips can give you a read on whether the current move is backed by participation.
The Sensitivity input
The single setting that matters is Sensitivity, which is the length of the SMA applied to OBV. Lower values make the indicator react faster to changes in volume flow (more color flips, more noise), while higher values smooth things out and only flip on more established shifts. Tune it to your timeframe and trading style — there's no universally "correct" value.
Notes
It works on any timeframe and any asset, as long as that asset reports volume data. On symbols without volume (some forex pairs and certain indices), OBV can't be calculated and the script will let you know. Colors are fully customizable in the settings.
This is a context/confirmation tool, not a standalone signal — it tells you about volume flow, not where to enter or exit. Use it alongside your own analysis.
This indicator colors your candles based on the relationship between On-Balance Volume (OBV) and a moving average of OBV. It's a simple way to keep volume-based trend context visible directly on the price chart, without having to watch a separate OBV pane.
How it works
OBV accumulates volume on up-closes and subtracts it on down-closes, so a rising OBV means volume is flowing into the asset and a falling OBV means it's flowing out. This script takes that OBV line and compares it to a simple moving average of itself:
When OBV is above its SMA, volume momentum is building → candles are painted green.
When OBV is below its SMA, volume momentum is fading → candles are painted red.
The idea is that volume often shifts before or alongside price, so the color flips can give you a read on whether the current move is backed by participation.
The Sensitivity input
The single setting that matters is Sensitivity, which is the length of the SMA applied to OBV. Lower values make the indicator react faster to changes in volume flow (more color flips, more noise), while higher values smooth things out and only flip on more established shifts. Tune it to your timeframe and trading style — there's no universally "correct" value.
Notes
It works on any timeframe and any asset, as long as that asset reports volume data. On symbols without volume (some forex pairs and certain indices), OBV can't be calculated and the script will let you know. Colors are fully customizable in the settings.
This is a context/confirmation tool, not a standalone signal — it tells you about volume flow, not where to enter or exit. Use it alongside your own analysis.
Release Note
Adding a color flip transition selector.Release Note
Small display adjustmentRelease Note
Changed the indicator names to OBV Trend Detectionสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
atreidis.app/ Know what regime Bitcoin is in, daily.
Built by a Bitcoiner who got tired of riding the chart down 70%+ every cycle. One dashboard. One color-coded signal. Read the market at a glance.
Built by a Bitcoiner who got tired of riding the chart down 70%+ every cycle. One dashboard. One color-coded signal. Read the market at a glance.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
atreidis.app/ Know what regime Bitcoin is in, daily.
Built by a Bitcoiner who got tired of riding the chart down 70%+ every cycle. One dashboard. One color-coded signal. Read the market at a glance.
Built by a Bitcoiner who got tired of riding the chart down 70%+ every cycle. One dashboard. One color-coded signal. Read the market at a glance.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน