Weekly exploration using "From-to" range does not return results if date falls on non-Fridays

Hi Amibroker experts,

When running weekly exploration using "From-to" as range on the Analysis window, the dates that fall on Fridays will return results. Dates that are non-Fridays will not return results. However, if I use "N recent bars" as range, even the dates that fall on non-Fridays will return results for weekly exploration. Is this expected behaviour or maybe something is wrong with my AFL script?

Is it possible to get weekly exploration to return results even when the dates fall on non-Fridays using "From-to" range?

Talking about weekly bars here...

Last week if not having reached Friday yet or historical data missing Fridays (because of Holidays) will output non Friday. Your from-to range (apparently) did not include last week of array.
N-recent bars includes last week bar. That is the reason.
Include last week's last date into your from-to range and you will get non Friday output too (if last week is not ending on Friday (yet) or if Friday is Holiday).


Same non Friday output with n-recent weekly bars.

1 Like

Fx is replying, you;ll probably get a very good answer :slight_smile:

But from-to is daily bars and N-recent are the weekly bars themselves.
There is a fundamental difference b/w the two.

Friday because Compress Function default ExpandsLast and Monday or (Sun) is probably you're first working day.

1 Like

Thank you fxshrat and travick for the replies.

Seems like what I want to achieve with weekly exploration using single-day "From-to" range is not possible because of the fundamental difference in the nature of "From-to" and "N recent bars" range. "From-to" range analysis are always done using daily bars. "N recent bars" is more flexible. Can be weekly bar, daily bar, monthly bar depending on the settings.