Pine Script

Loop through a set or all historical bars in Pine Script

Pine Script

Loop through a set or all historical bars in Pine Script

I receive quite a lot of questions about how to loop over the bars in Pine Script. Many of the indicators require this kind of calculation you might have these questions yourself as well. If you’re not very familiar with the way Pine Script works you might implement your code in a very inefficient way. Loop through a set or all historical bars in Pine Script Read More →

Loop through a set or all historical bars in Pine Script Read More »

Backtesting Pine Script Strategies on entire history with Deep Backtesting

If you backtest a lot of strategies in TradingView you most likely know that that TradingView is a bit limited in terms of backtesting. If you run backtest in a standard way you get your backtest computed on the last ~ 20k bars only for the most expensive account. And that’s not enought for majority

Backtesting Pine Script Strategies on entire history with Deep Backtesting Read More »

The `when` parameter will be deprecated in future Pine versions. How to fix it?

Just recently you might start to see the following warnings in Tradingview : line 12: The `when` parameter will be deprecated in future Pine versions. We recommend using `if` or `switch` conditional blocks instead This is happening when you’re using “when” parameter in any strategy.* functions. For example, following code will produce 2 warnings for

The `when` parameter will be deprecated in future Pine versions. How to fix it? Read More »