Amibroker database configuration for erasing older data


Can I configure Amibroker in such a way that not more than 5 days data should be stored in database? So If 6th day data gets updated then older 1st day should be erased automatically. My base time frame interval is 1 minute.

If not possible directly then Is it possible to achieve the same programmatically ?


You can limit the number of bars in your database - for example to 60 min x 24 h x 5 days = 7200 bars. Read here:

1 Like

Thanks Milosz. Just for confirmation NSE market trades for 6h 15 minutes which means 375 minutes. For 5 days its 1875 candles. Calculation for No of Candles selection is based on database's base time interval, Correct ? In my case Base Time interval of database is 1 minute.

Yes, that is correct.