Get rid of bad ticks



in context with another developing problem, I coded a strategy which I use in Amibroker also in another backtesting platform. The initial problem was easily identified. But then I found some other differences between the signals of the other program and the signals of AB. It took a while till I found out the problem: Different indicator values which are the result not becasue of different calculation methods but because of bad (iqfeed) ticks in AB.

I think I have read somewhere on the AB site that you are able to correct this issue with a backfill of the data. So I tried the following:

Here is a bad tick:


I tried to correct it with this:

But when I look into the chart again, the bad tick (and therefore the wrong indicator value) is still there.

When I select the chart window again and press the right mouse button on the plugin-status field in the right below corner and select “Force backfill”, the bad tick is corrected:


I use AB extensively for scanning/exploration and it would be really important for me to get rid of the bad ticks in an efficient manner (not by starting the process with Force Backfill option for every single symbol). Is there a way, please?

Thank you

Duplicate: How to filter "bad" ticks in stocks?
How to optimize backfill with IQFeed (reopened)

IQFeed is unfiltered feed, and that is why you would inevitably see bad tick from time to time, see


Hello Tomasz.
Thanks for the link and confirmation of this issue.

Now I am looking for a way to eliminate these bad ticks for a group of symbols in an efficient manner. As it is explained in the article How to work with Real-Time data plugins ([]), there is the possibility to use the command Force backfill in the plugin context menu for a single symbol. This works for me most of the time, but it would be a bit cumbersome to do this action for hundreds symbols every day. Therefore I thought I could use the method which is described at the end of the forementioned article, by executing a scan of a single line (buy=1;) AFL-script on all relevant symbols (with time range: all quotes). But when I do this, it seems not have an effect on the bad ticks…

Therefore, my question: Is it possbile to do somehow a forced backfill for a group of symbols to get rid of many bad ticks at once?

Many thanks


There is an ATR-based bad tick filter inside plugin that you can tweak in File->Database Settings->Configure. As to Force Backfill it is too heavy command to be available other than manually.


The 1-min chart today for SPY with IQFeed data looks like this

Notice the several spurious ticks? These are apparently block trades which might be getting posted late. The Time & Sales for one of the ticks is this

On Yahoo Finance the the SPY 1-min chart has none of these spurious ticks and looks like this:

I also tried this in another charting program with IQFeed and the chart was similar to Yahoo’s. How can I filter out these ticks in Amibroker/IQFeed? I contacted the IQFeed tech support and they said “IQ Feed is an unflitered data feed. You would need to use your charting platform to filter these type of trades maybe by INC Volume if you do not want to see them.” Thanks.


Are the big green bars in the below image due to bad ticks?

I feed the data into Ami through a utility from my trading terminal.

If yes, then could you please advise solutions in detail ?


No, these bad candles are because you are using 3rd party “utility” that feeds incorect data, instead of using supported data source.

The ONLY supported data sources are listed here:

BTW: your email is NOT on registered user list and you joined 2 months ago. What AmiBroker are you using?