Overview
Pine Script Warnings
Understanding warnings when you add scripts to TradingView
What is a warning?
Warnings are messages from the Pine compiler that highlight non‑critical issues, like unused variables, implicit type casts, or best‑practice suggestions. They do not stop your script from compiling or running.
Common examples
- Unused variable or function
- Implicit type conversion
- Deprecated function notice (with a suggested alternative)
- Statement has no effect
What should you do?
- If your script compiles and adds to chart, you can proceed and ignore the warnings.
- If a warning later becomes an error after changes, tell HorizonAI: "fix the compile error" and paste the error message.
- For cleanliness, you can ask HorizonAI to "remove unused variables" or "update deprecated calls"—this is optional.
When to act
- If you see an Error (not a Warning), the script won’t compile—share that error with HorizonAI to fix.
- If a warning mentions deprecation with a deadline, consider updating, but you can still run the script today.
Bottom line: warnings are normal. If the script adds to the chart and behaves as expected, you’re good to go.