The resource loading... loading...

PINE Language

The platform supports, and is compatible with, scripts in PINE language of Trading View. The PINE language is a lightweight yet powerful strategy design programming language for creating backtested, live-trading indicators and strategies, with a thriving forum that has created more than 100,000 PINE scripts. Users can easily access and apply a wide range of technical analysis and trading strategies; users can quickly implement their trading ideas with the help of community scripts, eliminating the need to write code from scratch and thus significantly reducing development time; it helps both novice and experienced traders to learn and understand different technical indicators, strategies and programming concepts.

PINE language strategy example: Super trend strategy

strategy("supertrend", overlay=true)

[supertrend, direction] = ta.supertrend(input(5, "factor"), input.int(10, "atrPeriod"))

plot(direction < 0 ? supertrend : na, "Up direction", color = color.green, style=plot.style_linebr)
plot(direction > 0 ? supertrend : na, "Down direction", color = color.red, style=plot.style_linebr)

if direction < 0
    if supertrend > supertrend[2]
        strategy.entry("entry long", strategy.long)
    else if strategy.position_size < 0
        strategy.close_all()
else if direction > 0
    if supertrend < supertrend[3]
        strategy.entry("entry short", strategy.short)
    else if strategy.position_size > 0
        strategy.close_all()
MyLanguage Blockly Visualization