When AB is connected to real-time data feed is it possible to only keep the last n bars and remove the old ones as fresh data comes in. My AFL is quite time consuming and my pattern requires on 60 bars so i wish to flush the old ones.
Is this possible?
Yes, go to the File->Database Settings and adjust "Number of bars" accordingly.
AmiBroker would just keep that many bars and not more.
Alternatively you can just zoom in your chart to show just 90 bars and
add
SetBarsRequired(0,0);
at the end of your formula as explained in the Knowledge Base:
2 Likes