1. HISTORICAL DATA use Defparam PreloadBars = 10000 and, if the error is still reported, then reduce the amount of periods for calculations as some indicator needs more bars than that (say AVERAGE[15000])
2. DIVISION BY ZERO it’s self-explanatory, you cannot divide anything by ZERO, so you will have to make sure no expression used yields 0 (you should post your code to let us try to help you)
Three pics out of 4 reported the same error, I think it’s a bit redundant.