February 26, 2015

New features of Pine Script Language!

New features of Pine Script Language!

  • “Text” argument for “plotshape” and “plotchar”

  • New types of “shape”:

    • shape.arrowup,

    • shape.arrowdown,

    • shape.square,

    • shape.diamond.

The function “plotshape” contains 10 styles now.

Example 1: Buy/Sell Arrows

study('Ex 1', overlay=true)
data = close >= open
plotshape(data, color=lime, style=shape.arrowup, text="Buy")
plotshape(not data, color=red, style=shape.arrowdown, text="Sell")

Example 2: Text with plotchar

study('Ex 2', overlay=true)
data = close >= open
plotchar(data, char='a', text='Text')

Example 3. Multiline text

study('Ex 3', overlay=true)
data = close >= open
plotshape(data, style=shape.diamond, text='line one\nline two')

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