Im trying to create the Donchian Channel which uses the preceding 20day high. So I figure to use movmax but it includes the current/center number.
A = [4 8 6 -1 -2 -3 -1 3 4 5];M = movmax(A,[2 0])M = 4 8 8 8 6 -1 -1 3 4 5
Is there a way to not include the center value?
Best Answer