Python

Implementing Pivot Reversal Strategy in Python with vectorbt

QuantNomad

Implementing Pivot Reversal Strategy in Python with vectorbt

The pivot reversal strategy is a popular trading strategy for crypto. It is based on the principle of buying or selling when the price of an asset hits a certain level, signaling a possible reversal in its trend. This strategy can be used to capitalize on short-term price movements in crypto markets. So I decided Implementing Pivot Reversal Strategy in Python with vectorbt 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.