OPEN-SOURCE SCRIPT
تم تحديثه Split ATR

Split ATR cuts every bar at two ATR envelopes — one around the open, one around the close — and draws the result as stacked candles. Hue is the bar’s volume change; lightness is whether each slice closed up or down; chroma is how surprising that slice is relative to those envelopes.
A sibling of Split VWAP. Same overdraw, same volume-hue coloring. The cut is different. Chroma is the new channel.
The cut
ATR is read from a lower timeframe so one chart bar contains several sub-bars. Auto is one-fifth of the chart: 1 minute on a 5-minute chart, 3 minutes on a 15-minute chart. The ATR length is a chart-bar window, scaled onto that subseries, so 14 on a 5-minute chart is 70 one-minute bars — the same span of time as ATR(14) on the chart.
Two values come off that series:
Open ATR — ATR on the first sub-bar of this chart bar
Close ATR — ATR on the last sub-bar of this chart bar
Those make two intervals, then the four endpoints are sorted in price order:
Open ± Open ATR
Close ± Close ATR
The four prices make five bands. A cut past the bar clamps onto the near extreme and collapses the empty band. A bar with no ATR yet is drawn whole and colored as the unsurprising core.
On the bar still forming, the first and last sub-bar start as the same bar, so open ATR equals close ATR until a second sub-bar appears. Open ATR then freezes; close ATR keeps updating.
What the slices mean
Each band is a slice of the bar. Membership of the slice midpoint decides how surprising it is:
In both envelopes — consensus core. Within typical reach of where the bar began and where it ended. Surprise 0.
Open only — departed. The bar left this zone behind. Surprise 0.5.
Close only — arrived. The bar moved into this zone. Surprise 0.5.
In neither, between them — the gap. Only exists when the two intervals are disjoint. Surprise 1.
In neither, outside both — excursion. Wick territory neither envelope accounts for. Surprise 1.
Color
Hue is the whole bar’s volume change. Red when volume fell, green when it held, blue when it rose. Every slice of the bar shares that hue. A symbol with no volume (an index) still splits; hue sits on the unchanged-volume green, and surprise and price lightness still color the slices.
Chroma is ATR surprise. The core is washed toward gray (Unsurprising chroma, default 0.25). Gap and excursion keep the full chroma. Departed and arrived sit halfway.
Lightness is closed-up / closed-down: each slice against the previous bar’s same-index close. An up close is the anchor color; a down (or unchanged) close is the same hue a step darker.
Up bodies are hollow. Wick and border stay opaque so the overdraw still hides the dash under a hollow middle.
The script draws in front of the chart’s own bars and covers them, so you do not need to hide the symbol by hand. Open ATR and Close ATR are what the status line and Data Window report.
Settings
Lower timeframe — Auto (1/5 of chart), or Custom. Must be shorter than the chart.
ATR length — chart-bar window (default 14). Scaled onto the lower timeframe.
ATR multiplier — scales both ATR values before the cuts are placed.
Unsurprising chroma — how much color the consensus core keeps.
Price down darkening — how much darker a down slice is than an up slice.
Volume-hue anchors — falling / unchanged / rising volume.
Built around a 5-minute chart with Auto (or Custom 1). Color conversions use the OKLCh library.
A sibling of Split VWAP. Same overdraw, same volume-hue coloring. The cut is different. Chroma is the new channel.
The cut
ATR is read from a lower timeframe so one chart bar contains several sub-bars. Auto is one-fifth of the chart: 1 minute on a 5-minute chart, 3 minutes on a 15-minute chart. The ATR length is a chart-bar window, scaled onto that subseries, so 14 on a 5-minute chart is 70 one-minute bars — the same span of time as ATR(14) on the chart.
Two values come off that series:
Open ATR — ATR on the first sub-bar of this chart bar
Close ATR — ATR on the last sub-bar of this chart bar
Those make two intervals, then the four endpoints are sorted in price order:
Open ± Open ATR
Close ± Close ATR
The four prices make five bands. A cut past the bar clamps onto the near extreme and collapses the empty band. A bar with no ATR yet is drawn whole and colored as the unsurprising core.
On the bar still forming, the first and last sub-bar start as the same bar, so open ATR equals close ATR until a second sub-bar appears. Open ATR then freezes; close ATR keeps updating.
What the slices mean
Each band is a slice of the bar. Membership of the slice midpoint decides how surprising it is:
In both envelopes — consensus core. Within typical reach of where the bar began and where it ended. Surprise 0.
Open only — departed. The bar left this zone behind. Surprise 0.5.
Close only — arrived. The bar moved into this zone. Surprise 0.5.
In neither, between them — the gap. Only exists when the two intervals are disjoint. Surprise 1.
In neither, outside both — excursion. Wick territory neither envelope accounts for. Surprise 1.
Color
Hue is the whole bar’s volume change. Red when volume fell, green when it held, blue when it rose. Every slice of the bar shares that hue. A symbol with no volume (an index) still splits; hue sits on the unchanged-volume green, and surprise and price lightness still color the slices.
Chroma is ATR surprise. The core is washed toward gray (Unsurprising chroma, default 0.25). Gap and excursion keep the full chroma. Departed and arrived sit halfway.
Lightness is closed-up / closed-down: each slice against the previous bar’s same-index close. An up close is the anchor color; a down (or unchanged) close is the same hue a step darker.
Up bodies are hollow. Wick and border stay opaque so the overdraw still hides the dash under a hollow middle.
The script draws in front of the chart’s own bars and covers them, so you do not need to hide the symbol by hand. Open ATR and Close ATR are what the status line and Data Window report.
Settings
Lower timeframe — Auto (1/5 of chart), or Custom. Must be shorter than the chart.
ATR length — chart-bar window (default 14). Scaled onto the lower timeframe.
ATR multiplier — scales both ATR values before the cuts are placed.
Unsurprising chroma — how much color the consensus core keeps.
Price down darkening — how much darker a down slice is than an up slice.
Volume-hue anchors — falling / unchanged / rising volume.
Built around a 5-minute chart with Auto (or Custom 1). Color conversions use the OKLCh library.
ملاحظات الأخبار
Updated defaults; ATR alignment between timeframes.ملاحظات الأخبار
Simplified coloringنص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Open-source chart instruments for futures traders. No signals.
alodis.io
alodis.io
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Open-source chart instruments for futures traders. No signals.
alodis.io
alodis.io
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.