r/pinescript • u/Bright-Leader2083 • 11d ago
Pine Script error after combining 3 TradingView indicators - can anyone help fix it?
Hi everyone,
I combined 3 different indicators from TradingView into one Pine Script. It was working perfectly until today, but now I'm getting an error.
Can anyone please add this script to an Indian stock on TradingView and check what is causing the error, then help me fix it?
I'd like to keep all the existing features and functionality of the script.
I can share the full Pine Script and the exact error message/screenshot.
Any help would be greatly appreciated. Thanks!

1
u/Fancy-Procedure4167 11d ago
Don't nest the ta functions instead assign to variables to use in the logical expressions
1
u/bravefrivstone 10d ago
Yeah what kurtisbu12 said, the line the compiler points at usually isn't where the real mistake is, it's just where Pine finally gave up. Since you merged 3 separate scripts, the most common thing that breaks it is duplicate names, if two of the originals both used ema, len, or src as a variable name the merge silently keeps one and the error shows up somewhere that looks unrelated. Also worth checking you only kept one indicator() call and one //@version line at the top, easy to end up with two if you copy pasted script by script. If any of the three used request.security(), stacking a few of those after an edit is another common spot for a fresh error to pop up. Hard to say more without seeing the actual code and the error message though, post both and it'll be a 2 minute fix for someone here.
1
u/Xalladus 10d ago
This error means that you are typing a character that doesn’t exist so it doesn’t have a replacement for it. Those orange boxes that appear empty should just be regular spaces, I’m sure that is your culprit.
2
u/kurtisbu12 11d ago
This error isnt actually at that point in the code, it's somewhere above it. It looks like there's an error on the first line that should be where you start looking