Pine Script

Logging in Pine Script

Pine Script

An easy way to sort a screener in Pine Script. How to sort a few arrays at the same time?

TradingView provides an incredibly powerful platform for traders to analyze the markets and make informed decisions. One of the most desired features of Pine Script is custom screeners. Custom screeners allow traders to quickly and easily find stocks/coins that meet their criteria. Quite often, you might want to sort the result of your customs screener. An easy way to sort a screener in Pine Script. How to sort a few arrays at the same time? Read More →

Automatically upgrade Pine Script indicators from version 3 and v4 to v5

Pine Script has many versions, and they are not very compatible with each other, making it difficult to switch from one version to another. You might experience quite a lot of issues when you try to copy part of the code from a script in another version or merge different version scripts. My universal advice Automatically upgrade Pine Script indicators from version 3 and v4 to v5 Read More →

Pine Script – Undeclared identifier ‘green’ / ‘color.green’ – how to fix it?

You might see the following error in Pine Script quite often, especially if you’re trying to merge a few scripts or copy certain elements from another script. You might see this error with basically all supported colors: Undeclared identifier `color.red` Undeclared identifier `color.black` Undeclared identifier `color.white` Undeclared identifier ‘red’ Undeclared identifier ‘black’ Undeclared identifier ‘white’ Pine Script – Undeclared identifier ‘green’ / ‘color.green’ – how to fix it? Read More →

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

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 →

How to concatenate strings in Pine Script

String concatenation is the main string feature in any programming language. It allows multiple strings to be joined together to form one larger string. This is used in many programming languages to create more complicated strings. String concatenation can be used to combine strings of different lengths, as well as to concatenate strings of text and numerical data.