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. اقرأ المزيد في شروط الاستخدام.