PineConnector PineScript 101
Welcome to the PineConnector PineScript 101, everything you should know when about PineScript when trying to use PineConnector. If you are looking for a library with scripts already compatible with PineConnector, please visit the PineConnector Script Library.
Section | Description | Remarks |
---|---|---|
1 | Creating a PineScript | Creating a script in the Pine Editor |
2 | Basics | Version, Identifiers, Comments, Strategy vs Study, Overlay |
3 | Plotting | Shapes, Arrows, Characters, and Data Series |
4 | Alerts | Alert() and Alertconditon() |
5 | Best Practices | asd |
Section 1: Creating a PineScript
PineScript, the scripting language designed by TradingView.Description | Remarks | |
---|---|---|
1 | At the bottom of your TradingView tab, click "Pine Editor". | |
2 | At the bottom panel, click "Open" and then click "New blank indicator". | |
3 | You will see the default code shown in the attached image. | |
4 | You are now ready to code your script. |
|
Section 2: Basics
Basic, but important.Component | Remarks |
---|---|
PineScript Version Number |
When you open your Pine Editor, you should see the Version number at the top few rows. If your script is on Version 3, If your script is on Version 4, |
Comments |
|
Identifiers |
|
Strategy vs Study |
|
Overlay |
With overlay=true, the plot was added on the chart itself. With RSI ranging between 0 and 100 and EURUSD hovering around 1.18, the combined output means you can only see the RSI.
With overlay=false, RSI has its own pane below the chart. |
Section 3: Plotting
Plot everything so you can see what you are doing.Component | Remarks |
---|---|
Shapes (plotshape) |
|
Arrows (plotarrow) |
|
Characters (plotchar) |
|
Data Series (plot) |
|