I’m using this code to calculate pivot points. This returns an array with 0’s where there’s no pivots and the value of the pivot if there is one. When Comparing the results to TradingView (downloaded csv with pivot points), the only time it matches exactly is when lookback left and right are both 5. Otherwise it deviates in the number
Tag: pine-script
Why do I keep getting ‘undeclared identifier’ error message on pine script?
I’ve been getting undeclared identifier’ error message on pine script and now it’s getting frustrating. This is the full code, Thanks y’all. Answer Variables that are declared inside a function can only be used inside that function. It is also important to observe the correct number of spaces.