Pine Script Video Lessons

Here’s a list of my YouTube Pine Script video lessons and the source code for each of them!

Lesson 1: Hello World!


//@version=4
study("Lesson 1")
plot(close)

Lesson 2: Drawing Data to the Chart


//@version=4
study("Lesson 2", overlay=true)
lookback = input(title="Lookback Period", type=input.integer, defval=50, minval=1)
highestHigh = highest(high, lookback)
lowestLow = lowest(low, lookback)
plot(highestHigh, color=color.red, transp=0, linewidth=2)
plot(lowestLow, color=color.blue, transp=0, linewidth=2)

TradingView Charting Platform