I just noticed in both NT7 and NT8 versions of the HeasdAndShoulder Indicators (HSBasicDef) developed by Ninja, there may be some inconsistency in defining and handling parameters that may cause errors when applied.
Specifically, the N value In the following code has already been defined as N = 5 under the SetDefaults. Then, under OnBarUpdate we have :
p1 = MIN(Close, N)[0]; p1b = LowestBar(Close, 5);
Assuming a user changing the N value as a variable, having a value of 5 in the second line would certainly create a condition that may generate an "out of bounds" error.
I personally do get some "out of bounds" error if I use the indicator in its current coding.
If this is a coding error, then I assume both NT7 and NT8 version of this indicator need a little fix, changing 5 to N in the second line.
Cheers!
Comment