Reading someone else’s script
Published community scripts are readable on the platform. When you want to see how something is done, that is where to look.
How the library works
A script can be published, and a published script can be public or private. The library holds published scripts and their likes, and you can search it.
Start at the top
Every published script begins with an indicator declaration. Read that line first: it is the script declaring itself.
The vocabulary repeats
Six names recur throughout the published library: indicator, color, plot, input,
close and true. A reader who knows those six can read most of the library.
The shape below is the one you will meet at the top of nearly every script you open:
indicator("Closing price")
plot(close)What you will rarely meet
A script that will not validate is unusual.
When you meet a name you do not recognise, look it up in the reference before deciding it is a mistake. If it is a mistake, it will be one of the names on What Lipi does not do.
Read it, then check it
Open a script, then check it in the editor. A check returns the symbol table the script resolved to, which shows you what an unfamiliar script declares.