OPEN-SOURCE SCRIPT
Emmanuel Optuma Bar Colors v2

This script colours TradingView’s Bar Chart to follow a simple, powerful bar-type logic used in Optuma-style analysis.
It makes the chart easier to read by showing the relationship between:
Up bars
Down bars
Outside bars
Inside bars
🔍 Bar Type Detection
Up Bar
Close > Previous close
→ Indicates upward strength
→ Coloured Green
Down Bar
Close < Previous close
→ Indicates downward pressure
→ Coloured Red
Outside Bar
High > Previous high and Low < Previous low
→ Market expands its range
→ Coloured Blue
Inside Bar
High < Previous high and Low > Previous low
→ Market contracts inside the previous bar
→ Follows previous bar’s colour
🎨 Colour Rules Summary
Bar Type Colour Meaning
Up Bar 🟩 Green Bullish pressure
Down Bar 🟥 Red Bearish pressure
Outside Bar 🔵 Blue Range expansion, bar resets structure
Inside Bar Same as previous bar Market indecision, continuation
🧠 Inside Bar Logic (Very Important)
Inside bars always copy the colour of the previous bar, which means:
If the previous bar was Green → inside bar becomes Green
If the previous bar was Red → inside bar becomes Red
If the previous bar was Blue → inside bar becomes Blue
This keeps the structure visually consistent and easy to read.
📈 Why This Helps Traders
This approach makes it easier to see:
✔ Trend continuation
Inside bars keep the trend colour, making swings clearer.
✔ Trend weakness
Inside bars after outside bars show contraction.
✔ Breakouts
Blue outside bars stand out as moments of range expansion.
✔ Market rhythm
The chart becomes easier to follow for beginners and advanced traders.
🧩 How to Use It
Set chart type to Bars
Add the script
Hide default colours (barcolor replaces them)
This instantly transforms TradingView into a teaching-friendly chart like Optuma.
It makes the chart easier to read by showing the relationship between:
Up bars
Down bars
Outside bars
Inside bars
🔍 Bar Type Detection
Up Bar
Close > Previous close
→ Indicates upward strength
→ Coloured Green
Down Bar
Close < Previous close
→ Indicates downward pressure
→ Coloured Red
Outside Bar
High > Previous high and Low < Previous low
→ Market expands its range
→ Coloured Blue
Inside Bar
High < Previous high and Low > Previous low
→ Market contracts inside the previous bar
→ Follows previous bar’s colour
🎨 Colour Rules Summary
Bar Type Colour Meaning
Up Bar 🟩 Green Bullish pressure
Down Bar 🟥 Red Bearish pressure
Outside Bar 🔵 Blue Range expansion, bar resets structure
Inside Bar Same as previous bar Market indecision, continuation
🧠 Inside Bar Logic (Very Important)
Inside bars always copy the colour of the previous bar, which means:
If the previous bar was Green → inside bar becomes Green
If the previous bar was Red → inside bar becomes Red
If the previous bar was Blue → inside bar becomes Blue
This keeps the structure visually consistent and easy to read.
📈 Why This Helps Traders
This approach makes it easier to see:
✔ Trend continuation
Inside bars keep the trend colour, making swings clearer.
✔ Trend weakness
Inside bars after outside bars show contraction.
✔ Breakouts
Blue outside bars stand out as moments of range expansion.
✔ Market rhythm
The chart becomes easier to follow for beginners and advanced traders.
🧩 How to Use It
Set chart type to Bars
Add the script
Hide default colours (barcolor replaces them)
This instantly transforms TradingView into a teaching-friendly chart like Optuma.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。