Hey 512mb, check the manual on ATR function. It does say that when TimeFrame>1, that ATR() will internally create a series (therefore, the ATR-created series becomes inconsistent since it wouldnt be called on every iteration).

You can't create a series inside of conditional statement. Instead, I think your workaround is the correct solution in this case.