PineConnector PineScript 101
Welcome to the PineConnector PineScript 101,
everything you should know when converting your TradingView script to be compatible with PineConnector.
If you are looking for a library with scripts already compatible with PineConnector, please visit the PineConnector Script Library.
If there is something that we should cover, please drop us a note.
|1||Creating a PineScript||asdasd|
If you felt that this guide was helpful in your learning,
please consider buying us some beer.
Section 1: Creating a PineScriptPineScript, the scripting language designed by TradingView.
|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: BasicsThe fundamentals, explained like you are 15.
On row 4 of the script, we can see the following:
It represents the latest PineScript Version.
Accordingly, you should be referring to the Version 4 of the PineScript Manual.
|2||Identifiers||Identifiers are used for your variables and functions.
Identifiers cannot begin with a number and are case-sensitive.
|3||Commenting||Any text that starts with "//" is a comment.
Comments will not be run and are are used for documentation.
Remember to document frequently so you can refer back at a later point and understand the codes.
|4||Strategy vs Study||Strategy scripts are used for backtesting.
This means Strategy Codes can be used to simulate buy and sell orders.
Study are for normal script calculations but cannot be used for backtesting.
Without the simulation of orders, less resources are used and will run faster.
Use this, unless backtesting.
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.