Hello to all ).
Is there a universal way in AFL to get count of valid bars for in AFL, when running in exploration mode with option "Pad&Align" to ^SPX turned on. By valid i mean real trading (days) bars count which is native to the symbol and not extended with Pad/Align option.
Right now I need to separate code for this. Say when running exploration I'm using:
barnumber = BarsSince(isEmpty(c))-1;
so every next day i'm getting correct number of the bars.
But when to apply this code as indicator - then in the chart this method does not work, because no empty bars at all, and i need to use something different, say:
barnumber = BarsSince(Status("FirstBarInRange"));
and when i'm trying to use this code in exploration with Align of data - this giving me wrong bar number because all symbols are extended with empty bars.
So I'm wondering if there is way to measure Valid Bar Number(count) in all modes?
Thanks in advance.