Regime filters
A filter is a fixed condition, chosen by you, that narrows down when trading is allowed: you only enter if the market is in the regime you want (with the trend, volatile enough, in the right session…). They are applied per direction — one set of filters for Long and another for Short — as a mandatory AND on the entry.
The idea: a fixed gate, not an optimized one
Long and Short each have their own set of filters. The usual setup: longs only in an uptrend, shorts only in a downtrend.
You choose them as a hypothesis; the engine does not optimize them. That avoids data-mining and does not multiply the size of the search space.
They gate when the position is opened. The exit, the TP and the SL are unaffected.
Close > SMA(Close,200) & Volume > mean(20)
Filter library
Every filter carries a bias: Bullish, Bearish or Neutral (symmetric, usable in both directions).
- Close > SMA(200)
- SMA(50) > SMA(200)
- EMA(20) > EMA(50)
- SMA(200) > SMA(200)[10] (rising average)
- SMA(100) > SMA(100)[10]
- ROC(Close,50) > 0
- + their bearish mirrors (<)
- ATR(14) > ATR(14)[5] (volatility expanding)
- ADX(14) > 25 (trending)
- ADX(14) < 20 (sideways)
- Volume > mean(20)
- Volume > 1.5× mean(20)
- RSI(14) > 50 · RSI(14) < 50
- ROC(Close,20) > 0
- DayOfWeek = Monday
- HourOfDay > 8 (from 9am)
- WeekOfMonth = 1 (first week)
- DayOfMonth > 24 (month end)
- Month > 9 (last quarter)
- MinuteOfDay > 569 (from 09:30)
Offset [n]
Any indicator can reference its value from n bars back, just like price does (Close[1]). By convention SMA(Close,200) is the same as SMA(Close,200)[0] (the current bar); the [0] is left out and only [n>0] is shown.
SMA(Close,200) > SMA(Close,200)[10]
ATR(14) > ATR(14)[5]
Where they are used
A Filters tab (next to Indicators, Patterns and Measures) lists the library with its expression, category and a Bias: label (Bullish / Bearish / Neutral).
The Filters… button opens a panel with two columns, Long and Short: tick which filters gate each direction. The button shows the count: Filters (L:2 S:1).
In the results, the export and the templates
In the CONDITION column of the results, the filter appears as its own segment at the end of the name, next to the entry, the exit and the TP/SL:
A filter that reads another market: the VIX
Beyond the library, any AQL Language condition can act as a fixed filter: type it in an AQL Code row in the Laboratory. Even one that reads another market, with the symbol in quotes (it must be registered in the Quote Manager):
Close of "$VIX" < 20
When you take to the Laboratory (or to Optimize exits) a strategy that already reads another market or has conditions on another timeframe, those conditions arrive this way, as a fixed AQL Code filter (visible and editable), and the rest as normal sweep indicators. Sweeps with conditions on another series or another timeframe run on the CPU: slower, but correct (before, the GPU silently computed them on the chart's series).
Technical limit: each strategy takes up to 8 entry conditions (GPU engine). Since filters add to the signal conditions, MaxAnd + number of filters ≤ 8; if you go over, the Mass Test warns you before starting.
AniQuant can be tried free for 14 days, with every module and no card. If you have the book, 30.