June 25, 2015

New feature of Pine Script Language: custom OHLC bars and candles

Added the ability to define your own custom bars and candles to Pine.

study("plotbar example")
palette = open <= close ? blue : orange
plotbar(open, high, low, close, color=palette, title="My Bars")

study("plotcandle example")
len = input(7, minval=1, title="Length")
src = input(close, title="Source")

o = open
h = high
l = sma(low, len)
c = sma(src, len)

palette = open <= close ? green : red
plotcandle(o, h, l, c, color=palette, title="My Candles")

You can read more about Pine Script Language in the Pine Script Tutorial and in the Pine Script Reference.