plotbar
Draws bars from the same four required series that plotcandle takes.
The difference is the colouring: one colour for the whole bar, with no separate wick or border. Neither function has an offset parameter at all.
plotbar(series float open, series float high, series float low, series float close, const string title, series color color, const bool force_overlay) → void| Parameter | Type | Required | Description |
|---|---|---|---|
open | series float | yes | The open of each bar. Required. |
high | series float | yes | The high of each bar. Required. |
low | series float | yes | The low of each bar. Required. |
close | series float | yes | The close of each bar. Required. |
title | const string | no | The name of the drawing. Const-form. |
color | series color | no | The colour of the whole bar. Series-form. |
force_overlay | const bool | no | Sets this drawing’s overlay, separately from the script-wide setting. |
Returns void — void.
indicator("Recoloured bars")
plotbar(open, high, low, close, title = "Bars", color = color.blue)See also bars and background
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.