SeriesIsBelowValue / SeriesIsAboveValue - Anomalous Behavior
Author: Carova
Creation Date: 2/23/2019 10:23 PM
profile picture

Carova

#1
Hi Eugene!

Just tried to use this function and I noticed the behavior does not match its description. When the "Period=1" it is supposed to count the number of times it is below that value. As the code below demonstrates it treats "Period=1" the same as any other period.

CODE:
Please log in to see this code.


Vince
profile picture

Eugene

#2
Hi Vince,

That code does not demonstrate anything. Not sure what you did wrong but the DataSeries works just fine:



CODE:
Please log in to see this code.
profile picture

Carova

#3
Hi Gene!

From the Wiki "To count the number of consecutive bars that the DataSeries has been below the value, use period = 1", but this does not do that. The value remains at "1". See below:

CODE:
Please log in to see this code.


Vince
profile picture

Eugene

#4
Now I see what you mean Vince. Instead of counting the number of consecutive bars that Series1 has been above Series2 (period = 1) the counter just stops and has a "plateau" look.

Thanks for the heads-up! I'm on it.
profile picture

Eugene

#5
Wow, that was a long-standing bug. To be fixed in Community Indicators v2019.03 (ETA end of February).
profile picture

Carova

#6
Thanks for tracking this down Eugene!

Vince
profile picture

Eugene

#7
So the idea is that SeriesIsAbove/Below and SeriesIsAbove/BelowValue have been implemented differently and now we're going to make them always match by replacing the *Value series code.
profile picture

Eugene

#8
Vince,

Community Indicators v2019.03 is out with fix to the bug you've discovered. Thanks.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).