Yes, this will crash as you've defined no arrays, but just empty series pointers. Can you post the formula for the upper and lower TMA band? I'll then translate it in C.