plotcandle

Draws candles from four series of your own rather than from the chart’s bars. All four price series are required. The body, the wick and the border take separate colours, and each of the three is series-form.

plotcandle(series float open, series float high, series float low, series float close, const string title, series color color, series color wickcolor, series color bordercolor, const bool force_overlay) → void
ParameterTypeRequiredDescription
openseries floatyesThe open of each candle. Required.
highseries floatyesThe high of each candle. Required.
lowseries floatyesThe low of each candle. Required.
closeseries floatyesThe close of each candle. Required.
titleconst stringnoThe name of the drawing. Const-form.
colorseries colornoThe body’s colour. Series-form.
wickcolorseries colornoThe wick’s colour. Series-form.
bordercolorseries colornoThe border’s colour. Series-form.
force_overlayconst boolnoSets this drawing’s overlay, separately from the script-wide setting.

Returns void — void.

indicator("Recoloured candles")
plotcandle(open, high, low, close, title = "Candles", color = color.blue, wickcolor = color.gray, bordercolor = 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.
Upgrade