Hi I have an indicator that I need to vary CALCULATEONLASTBARS. Is it possible to have the number of bars as a variable so I can change the number in the variables section rather than the code itself? It doesn’t seem to allow it but I am wondering if there is a workaround. Thanks Rob DEFPARAM CALCULATEONLASTBARS = 3000