There are times, when developing PineScript indicator/strategy, you might see the error:
Save operation failed, reason: Pine compilation was timed out. Attempts before blocking: X
The reason is not mentioned in Official PineScript’s errors documentation, however what we can say, is that there might be some “workarounds”:
- This happens mostly, when the script is large. Try to find the most resource-intensive parts of script and try to trim-out non-critical parts.
- Another reason might be that on the same time, you are saving the script two times. So, when you save script (
Ctrl+Sor whatever) don’t do it again before the “Processing …” starts and then it saves successfully. So, only after that, you can try to save other modifications.
- Another reason might be that you have that script added on chart at the moment of saving. So, before you save, remove script from chart, and try to save after that.