Lipi Reference Lipi

Types

shape

It's used to display different marker shapes on the chart. These shapes are often used for signals, alerts, or marking specific price levels.

Fields / Members

xcross Shape style for plotshape function.
cross Shape style for plotshape function.
triangleup Shape style for plotshape function.
triangledown Shape style for plotshape function.
flag Shape style for plotshape function.
circle Shape style for plotshape function.
arrowup Shape style for plotshape function.
arrowdown Shape style for plotshape function.
labelup Shape style for plotshape function.
labeldown Shape style for plotshape function.
square Shape style for plotshape function.
diamond Shape style for plotshape function.

Example


          indicator("Shape Example", overlay=true)
// Define bullish and bearish engulfing conditions
bullishEngulfing = close > open and close[1] < open[1] and close > close[1] and open < open[1]
bearishEngulfing = close < open and close[1] > open[1] and close < close[1] and open > open[1]
// Plot a triangle up for bullish engulfing
plotshape(series=bullishEngulfing, location=location.belowbar, shape=shape.triangleup, color=color.green, title="Bullish Engulfing")
// Plot a triangle down for bearish engulfing
plotshape(series=bearishEngulfing, location=location.abovebar, shape=shape.triangledown, color=color.red, title="Bearish Engulfing")
// Plot a cross at every bar where the close is equal to the open (Doji)
doji = close == open
plotshape(series=doji, location=location.abovebar, shape=shape.cross, color=color.blue, title="Doji")