Home › Documentation › Data & indicators
Realism

Inside the bar: 1-minute data

A bar only gives four prices: open, high, low and close. If your take profit and stop loss are both hit in the same bar, it does not say which came first. Nor whether a Stop order filled before or after the low. We call these bars doubtful.

Gaps. If the bar opens already beyond your stop or your target, there is no doubt: the trade exits at the open, as with a real broker. The stop exits worse than its level and the target better. It happens mostly intraday, where every session opens with a gap from the previous close. It does not apply on the bar you enter, because its open comes before your entry.

Without more data, AniQuant assumes the worst: the stop wins. But if the market has 1-minute data, it can look at it and know what really happened. It applies to the whole program: Laboratory, Genesis, Walk-Forward, Performance, Portfolio, TP/SL Map…

Where to choose it

In Settings → Inside the bar, with two options: Look at 1-minute data when the market has it or Always assume the worst (the stop wins). It applies straight away to everything you calculate afterwards.

Where the minutes come from

From the market itself: if the instrument has a 1-minute series in the Quote Manager (for example @ES 1 Minuto.bin), the daily, 90-minute and 5-minute series use it automatically. If it is not registered, it is looked up by name next to the file: @ES DIARIO.bin → @ES 1 Minuto.bin.

No surprises: only minutes that match are used

  • ·Back-adjustment. A 1-minute file of a continuous future can be shifted in price against the daily one (67.75 points in the @ES). AniQuant works out that offset bar by bar and corrects it. If the adjustment is proportional (stocks), it uses the ratio.
  • ·Time zone. If the minutes were exported with another time setting (one hour ahead, for example), it detects it from a sample of bars and corrects it.
  • ·Bar by bar. A bar's minutes are only used if their high and low match the bar's. If not (a day with different data, a shuffled market, a stretch without minutes), the worst is assumed in that bar, as always.
  • ·The same minute. If both levels are hit within the same minute, it is still unknown: the stop wins.
  • ·What does not change. Signals, TP, SL, trailing and break-even levels, and entry and exit prices stay the same. Only what was hit first changes.
Normal stops

With 2-5 % TP and SL, doubtful bars are 0.01-0.3 % of trades: the result changes by less than 1 % and the sweep is not noticeably slower.

Tight stops

With 1 % TP and SL on daily NQ, 4 % of trades are doubtful and in almost half of them the target was hit first. Assuming the worst ate three quarters of the result.

Stop orders

In the fill bar, the worst case counted the trade as lost if the bar hit the SL, even if that low came before the fill. With tight stops this is what changes the most.

How to tell what was used

Performance says it in the Inside the bar row: "1 minute: 31 doubtful bars resolved", "This market has no 1-minute data: 6 doubtful bars with the worst case" or "Worst case: 37 doubtful bars". If two computers give different results for the same strategy, check this setting first.

Cost: on the CPU, practically nothing with normal stops. On the GPU, 0 to 15 % more sweep time with normal stops and 20 to 45 % with very tight stops, which is exactly where the minutes change the result the most. With the minutes, CPU and GPU give exactly the same.

Try it yourself

AniQuant can be tried free for 14 days, with every module and no card. If you have the book, 30.

← Previous
Market regime filters
Next →
Entry conditions: thresholds and AND combinations
More in Data & indicators