Lipi Reference Lipi

Functions

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.

Syntax

                plotbar(series float open, series float high, series float low, series float close, const string title, series color color, const bool force_overlay) → void
              

Arguments

open required series float The open of each bar. Required.
high required series float The high of each bar. Required.
low required series float The low of each bar. Required.
close required series float The close of each bar. Required.
title const string The name of the drawing. Const-form.
color series color The colour of the whole bar. Series-form.
force_overlay const bool Sets this drawing's overlay, separately from the script-wide setting.

Return Type

void

Example


          indicator("Custom Bars Example", overlay=true)
customOpen = open + talib.sma(close, 5) * 0.001
customHigh = high + talib.sma(close, 5) * 0.001
customLow = low - talib.sma(close, 5) * 0.001
customClose = close + talib.sma(close, 5) * 0.001
plotbar(customOpen, customHigh, customLow, customClose, title="Custom Bars")