User error, was: Bug in AFL for BarsSince?

Hi,

I am Setting a predefined period and trying to ascertain which is the Lowest Low with in the defined period. And i want to find the number of bars since the lowest Low has occurred however i find the results are not right sometimes. Please help to resolve

SetPeriod=50;
LwstPoint=LLV(Low,SetPeriod);
LwPointbar=BarsSince(Low==LwstPoint); //-> here i am not getting the

image

That's because your BarsSince() function is looking for the condition when the value in the Low array is equal to the value in the LwstPoint array. Essentially, you are finding every instance of a new 50-bar low. Consider the LLVBars() function instead: https://www.amibroker.com/guide/afl/llvbars.html

6 Likes

I find it amusing and offending at the same time when beginners always assume bug in program and not in their understanding or their own code. Do they really believe that functions that are written 20 years ago and tested and used for 20 years by 20000+ users everyday have bugs in them ? Where did they got their super high self-esteem from?

How about being somewhat cautious when making screaming subject lines with "bugs"? How about using subject line like: "I don't understand how BarsSince works"? How about showing some respect to people who put all sweat into building flawless program for 20+ years.

12 Likes

Thanks @ mradtke. @ tomasz indeed this is an incredible tool. Apologize for the subject line. will be careful next time

1 Like

The Dunning-Kruger Effect. The struggle is real...

4 Likes