Pine Script Lessons & Tutorials


Pine Script Basics Course Pine Script Mastery Course


Intro: What is Pine Script?

Lesson 1: Getting Started with Pine Script

Lesson 2: Drawing Highest High / Lowest Low

Lesson 3: Working With User Inputs

Lesson 4: Generate Trading Signals With RSI

Lesson 5: How To Create TradingView Alerts


Lesson 6: How To Detect Engulfing Candles

Lesson 7: How To Create ATR Trailing Stop

Lesson 8: Higher Timeframe EMA

Lesson 9: How To Avoid Repainting


Here’s a list of highly reputable external resources that you may find helpful with your Pine Script coding if you encounter a challenge that isn’t already addressed in my material:

Pine Script User Manual:

The Pine Script User Manual is the go-to resource for all information relating to Pine Script. Their examples are minimal and concise, so if you don’t understand a particular subject you may need to do further research. But for general Pine Script documentation material, this is the best place to start.

Pine Script Language Reference Manual:

The Pine Script Language Reference Manual is also an invaluable resource for Pine Script coders. It contains brief information about every single inbuilt function or variable in the Pine Script language. Again, if you don’t understand a particular subject you may need to do further research, but if you just want a quick reference guide for what types of parameters a function takes or what the name of some inbuilt variable is etc., this is the best place to search.

TradingView Script Library:

This might seem obvious, but sometimes it’s too obvious to notice. The official TradingView Script Library consists of thousands of scripts written by Pine coders of all levels – from novice to intermediate to brilliant expert. And if you’re trying to write something in Pine, then there’s a good chance someone else has already tried. If you’re stumped on a particular section of your script, this can be a great resource to check for reference material!

Official TradingView Blog:

The official TradingView Blog is where all major updates and changes are announced for both the TradingView platform and for the Pine Script programming language. If a change is made to how TradingView or Pine Script operates, you’ll here about it here first. There’s also extra code examples for certain adjustments and improvements to the language which can be extremely helpful and that you won’t find anywhere else, so I highly recommend following their updates.

Pine Coders:

Pine Coders is a fantastic third-party resource for Pine Script. The contributors there are experts at Pine coding and their FAQ page addresses many of the more complex problems you may face when using Pine Script. There is a wealth of information here and I used this resource as reference material for a number of lessons on this website (and in my own scripts).


Kodify is another valuable third-party information resource for Pine Script coders. This is a coding blog run by an extremely talented programmer named Jos who hails from the Netherlands. I’ve found his code examples and tutorials a huge help in my own quest to master Pine Script, so if you encounter a problem that isn’t covered in my own material, you might very well find the solution there.

Back-Test Rookies:

Back-Test Rookies is yet another great third-party knowledge resource for Pine Script coding. These guys specialize in strategy scripts, but they have a whole bunch of valuable lessons covering all kinds of topics on their blog. I have used their website multiple times as reference material while learning the language, and although most of their code is for v3 of Pine Script, there are still plenty of great examples of how to achieve certain complex endeavors in Pine Script.

Free Premium Charts!