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.
How to Display Monthly Returns for PineScript Strategies?
No Comments

Based on my experience, PineScript strategies output appears to be quite limited. Performance is displayed by the plot and measured on a trade-by-trade basis. It is not uncommon that you want to see something that is not available by default. So it can get quite tricky to understand when the strategy works well and when How to Display Monthly Returns for PineScript Strategies? Read More →

How to fix “Value with NA type cannot be assigned to a variable that was defined without type keyword.”
No Comments

You can receive this error by running this simple code: Add to Chart operation failed, reason: line 5: Value with NA type cannot be assigned to a variable that was defined without type keyword The issue is that PineScript doesn’t know what type should this variable be. It can’t guess the type from the NA How to fix “Value with NA type cannot be assigned to a variable that was defined without type keyword.” Read More →

How to plot a table in PineScript?
No Comments

Just recently TradingView added a possibility to plot nice tables on your chart from Pine Script. It’s a really nice way to present information for your indicators and strategies. In this article, I will show you a very simple example of how you can plot a table from PineScript. To create a table you can How to plot a table in PineScript? Read More →

New TradingView Feature: Pine Script Tables
2 Comments

To display any textual information on the chart I used labels. And it doesn’t look very good. Here is an example of the code with label: So in this code I just compute 3 indicators and display their values for the last labels. This solution isn’t very nice. It’s pretty tricky to style your label New TradingView Feature: Pine Script Tables Read More →

How to fix the `transp` argument will be deprecated soon error?
No Comments

You may have noticed the following warning message in your PineScript indicator scripts: The `transp` argument will be deprecated soon. We recommend using color.new() or color.rgb() functions to specify the transparency of the plots instead. Below is an example of code that causes this warning. Why does this error occur? This warning message occurs simply How to fix the `transp` argument will be deprecated soon error? Read More →

How to Display Labels / Lines for the future bars in PineScript?
No Comments

Sometimes you might want to display labels in TradingView for the future bars so they won’t intersect with the latest bars. Also, it might be useful to plot lines into the future as a projection. From first sight, it’s not obvious how to do that in PineScript. In this article, I will show you an How to Display Labels / Lines for the future bars in PineScript? Read More →