The version line

//@vex=1 on the first line says which Vex a script is written for.

For AI tools: this page as Markdown · the whole language in one file

A script may start with //@vex=1. New scripts start with it, and the editor also records the version with every saved script and share link, so you never have to write it. If a later Vex ever changes what something means, a script keeps the meaning it was written for.

Pine's //@version=5 line is not needed; the editor points it out and the script still runs.

1//@vex=12name("EMA")3plot(ema(close, 21))