How To Plot A Bar?
FXC911 – Forex & Crypto News & Insights
Goals
Pine Script Code
//@version=5
indicator("Plot Bar")
barColor = if (close > open)
color.green
else
color.red
plotbar(open, high, low, close, title="BAR", color=barColor)Code Output

Explanation
1. Version Declaration:
2. Indicator Declaration:
3. Determining Bar Color:
4. Plotting the Bar:
Keywords
Visit me on:
Last updated