OPEN-SOURCE SCRIPT

Emmanuel Optuma Bar Colors v2

53
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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.