TradingView Tutorials

The Quant Nomad has over 6 years’ experience in the quantitative trading industry (15+ years in programming).
He has helped more than 200 traders and companies create/optimize their algorithmic trading models.
Defining an array in Pine Script.
No Comments

Arrays are an essential feature in programming languages, allowing for the storage and organization of data in a single variable. Arrays can be used to store multiple values of any data type, making them a powerful tool for storing and manipulating data in programming. In Pine Script, arrays can help you develop advanced indicators and Defining an array in Pine Script. Read More →

Displaying Pine Script indicator overlaying the price or in a separate chart.
No Comments

Depending on the type of your indicator, you might want to plot it on top of your price or in a separate pane. If your indicator has the same scale as your data, you might want it to display on top, for example, BB, SMA, or Ichimoku cloud. If the scale is completely different, you Displaying Pine Script indicator overlaying the price or in a separate chart. Read More →

The function ‘XXXX’ should be called on each calculation for consistency. It is recommended to extract the call from this scope
No Comments

Ever come across the following warning message in Pine Script? It happens quite often for some developers. The function ‘XXX’ should be called on each calculation for consistency. It is recommended to extract the call from this scope. This is not an error per se but rather a warning, which means your script will still The function ‘XXXX’ should be called on each calculation for consistency. It is recommended to extract the call from this scope Read More →

How to Set Time Input Interactively From Chart in Pine Script
No Comments

Data and time inputs can help you make more sense of your Pine Script indicators and strategies. Adding a time input is pretty simple in Pine Script. You only need to specify the time input and the script will highlight a bar with open equal to the selected time. Time Input in Pine Script Here’s How to Set Time Input Interactively From Chart in Pine Script Read More →

How to Set Price Input Interactively From Chart in Pine Script
No Comments

Inputs in Pine Script make it possible for traders to change the values that the script uses in its calculation logic. TradingView provided specific widgets for price and other types of input. Recently (late 2021), TradingView introduced a new interactive mode for time and price inputs that allows users to simply modify inputs by clicking How to Set Price Input Interactively From Chart in Pine Script Read More →

How to Know if Your Current Bar is in a Certain Session
No Comments

You may sometimes need to add some session logic to your TradingView strategies and indicators. This can be useful especially when you want to execute your entries only within a certain time window and close all positions when this window is over. Check Session Status  The first step is to check that the current bar How to Know if Your Current Bar is in a Certain Session Read More →