And I think I have found a bug, based on my view how it should work.
So based on my view it should count rising sequence or falling sequence >= bars.
It is actually implemented to count rising sequence or falling sequence >= bars-1.
So i think it might be a bug.
it is a good point. You are right, our implementation checks one bar less than it should.
For example if checking IsRising with BarCount = 3, we check that X2 < X1 < X0, so we are basically checking last 3 values, but it is true if at least 2 last bars are rising.
We are using this implementation from the very beginning and in all supported platforms.
It is easy to change that, but it would have an impact on many existing strategies, so we think it's better to let it this way and just keep in mind, that one should user barcount + 1 when creating strategies manually.
Best regards,
Tomas