Finally we use the plot() function to print these on to the chart with different colours. Loops — Pine Script™ v5 User Manual v5 documentation In the above example, study () and the if statement are examples of that. Method #1 uses a change in the color of the RSI plot on the condition. In Pine, nested functions are not allowed, i.e., one cannot declare a function inside another one. If it is, 1 is stored to x_int . It is Boolean and accepts only true or false. If it cannot be done then I think this function is quite useless. Uncategorized. line 103: Cannot use 'strategy.risk.allow_entry_in' in local scope. But what does that mean? So you can try to switch to version 2 by adding a special attribute in the first line. Tradingview: Pinescript Debugging, Plotting, Tips and Tricks Overview: plotting in TradingView Pine Scripts · Kodify A complete list of everything I’ve published (including libraries, for programmers) is here on TradingView. ; line 113: Cannot use 'strategy.risk.allow_entry_in' in local scope. First we set the series argument of the plot () function to the values we want to plot. It is versatile and can plot different styles of lines, histograms, areas, columns (like volume columns), fills, circles or crosses. Nested if statement in TradingView Pine Script · Kodify I have a long list of stuff I want to create – see the Roadmap. Execute functions in TradingView’s if/else: how? · Kodify (e.g x = false) x_int = x ? Pine of version 2 (and higher) is better at explaining errors of this kind.