However the problem in not in the code. There is a serious bug in TwoHundredFiftySix Max bars implementation. Attached 2 images - one with a strange behaviour when TwoHundredFiftySix is set, another, with the same data with a normal behaviour, when set to Infinite.
It occurred in beta 17.
Attached 2 images and the code I'm using original Gumphire's RMMA with enum declaration outside of Namespace Indicator scope, in order to compile.
In the 3-rd image you can see a RMMA periodical behaviour. I didn't check, but I bet, the period is 256 bars.
Attached a code, which caused a bug to appear.

Comment