Aux1 data calculation NO problem in TimefrageGet

Can anyone please look into this and kindly suggest solution.

I imported data in Aux1 and Aux2 columns also. When I'm trying to get weekly Aux1 data along with volume calculations it is behaving weirdly when getting Aux1 data. Volume data is no problem. Where I'm getting wrong. Please suggest any solution.

//custom calculation
TimeFrameSet( inWeekly );
AB = Aux1; //custom data into weekly
AC = Volume; //volume data into weekly

//timeframe expand mode
WV = TimeFrameExpand(ab, inweekly);
WO = TimeFrameExpand(ac, inWeekly);

WC = WV/WO; 


AddColumn(wv, "", 1.2); 
AddColumn(wo, "", 1.2); 
AddColumn(wc, "", 1.2);

Data in Aux1 for last 5 days :


Total = 10271077838

Volume data for last 5 days :


Total = 9112151

After running the above analysis I'm getting the following result :
Aux1 total = 4090864384
Vol total = 9112151

Volume is displaying correctly, but Aux1 data display wrong. As it is displaying last day of the data, not total of last 5 days of Aux1 data.

Please suggest the required modifications in the above afl.

Thanks with regards,

@Tomasz just studied that ... choosing compression method for Aux1 and Aux2 in database>intraday settings > chagne to Sum from last will solve the above problem? I think this is the reason I'm getting last value for Aux1 in my analysis window.

That is why you should be very careful when making claims about anything in AmiBroker being wrong. The truth is that you simply don't know how it works, don't know the program and don't know that you are missing functionality that exists but you are not aware of its existence.

By default Aux fields use "last" compression mode but it is SELECTABLE BY THE USER in File->Database Settings->Intraday Settings. Once you change to "sum" it will perform sum. Nice isn't it?

So next time when you think something is wrong in AmiBroker, assume your own ignorance, instead of announcing the world that you found it is wrong.

1 Like

"Wrong" in the sense in my AFL, not in software. I know some thing I missed in line, that's why I clearly mentioned in the first para "where I'm getting wrong". Not the "Amibroker". I know, it's best and very user friendly software.

I admitted that I'm wrong in the first paragraph itself, so there is no need to me announcing anything new to the world.

Thank you for the suggestion. :slight_smile:

1 Like

By the way, I forgot to mention in the previous reply when the changes made in the settings it's performing well... It's so nice...and awesome functionality across all the time frames. So clever....! :clap: huge relief to me, where last two days I'm thinking and experimented a lot of tests through AFL's how to get it right? At last, solved.