Hello All, I am starting a new thread for this subject because the old thread (Second thoughts on Static arrays) got too cumbersome for this side issue.
After a lot of head scratching and hints from TJ and others, I finally found a technique for removing bad ticks in a 5 second database while also being able to process bars at other intervals for real time indicators. It is so simple it is almost embarrassing. The trick is to use linked charts and pass data between them only in the 5 second timeframe with an ATC ticker. In essence, I have two processes running in realtime. One is running a simple fast bad tick removal AFL process on something like 60K bars of 5 second data (180ms overhead) and it passes that data to the second AFL process which compresses the 5 second clean data into the desired timeframe for indicator generation on far fewer bars, say 2000. First I run a 5 second bad tick removal AFL in one chart and save the clean OHLCV data using ATC to a single ticker symbol every AFL pass. In the linked chart, I replace the OHLCV arrays to get the clean OHLCV data using Foreign(). I can also put a SetBarsRequired(maxBars, 0) at the end of the AFL to control the size of the data arrays, or just let fast AFL do its thing. That is all there is to it. I will post the AFL soon, but I might have uncovered a bug and I want to check with support about that first. Dennis
