Home › Documentation › Market study
Market study

TP/SL Map

It buys (or sells) on EVERY bar and waits until the price touches the Take Profit or the Stop Loss. It sweeps a complete TP × SL grid (as a % of price) and measures which exit ratio would have performed best. Because the entry is trivial —no filter, no signal—, what it reveals is not a strategy but the market's structural bias: its natural drift under each combination of targets. It is the reference «floor» that any entry with a real edge ought to beat. It opens from Market → TP/SL Map… (it lives under Market, and not among the validation tools, because it validates nothing: it describes the instrument).

The settings

Direction

Long, Short or both. It measures the market's bullish or bearish bias.

Mode

Overlapping: every bar is an independent trade. One at a time: it does not re-enter until the previous one closes.

Entry

Close (the touch is looked for from the next bar on) or Open (from that very candle). The exit is intrabar, at the exact TP/SL level.

From / To

It limits the entries to the period; the close is looked for across the whole loaded history (a cushion to resolve the last ones).

TP% / SL% ranges

The minimum, maximum and step of each axis. By default, 1 to 25 in steps of 1.

Combination · Offset

Full grid: it sweeps every TP against every SL (e.g. 100×100 = 10,000). Paired (diagonal): for each TP, a single SL = TP + Offset → it sweeps only the list of pairs, blazingly fast. Offset 0 = TP and SL equal; +1 = SL one point larger; −1 = the other way round. On the diagonal the Heatmap does not apply: use Table, Curves or Summary.

Max bars/trade

A cap on how many bars each trade may last before being written off as Unresolved (a kind of time stop). 0 = no limit.

⚡ Auto / GPU / CPU engine: the sweep runs on the GPU (OpenCL) when it is available, with exact parity against the CPU. There is a live stopwatch and a Cancel button. An «Unresolved» trade is one that reaches the end of the data without touching either TP or SL.

The five views

📋

Summary (The Verdict)

It reads the map in plain language: the best combination by Net Profit, plus cards for the most reliable one (Profit Factor), the best per trade (expectancy), the lowest risk one and the best for efficiency. It explains what the optimal TP:SL ratio says about the market and warns about problems (an optimum on the edge, too few trades, too many unresolved). It includes the optimal ridge.

🔥

Heatmap

A colored grid (rows = TP, columns = SL) by the chosen metric (Net Profit, P.F., Win%, No. of Trades, Unresolved or Net/DD). Click a cell to pin it with its full record and a button to see it in Curves. Hover for an on-the-fly reading.

low → high
▤

Table

Every combination with all its columns (Winners, %Win, Losers, Unresolved, Trades, Profit, Loss, Net, P.F., Max DD, Average and Net/DD). Sortable by any column with a click.

📈

Curves

Six charts (%Win/%Loss, Profit Factor, Profit/Loss, Net Profit, Expectancy per trade and Winners/Losers/Unresolved) along a selectable slice: the TP=SL diagonal, a fixed SL varying the TP, or a fixed TP varying the SL.

🔬

Robustness (In-Sample / Out-Of-Sample)

It splits the period in two halves: it looks for the best TP/SL in the first and checks whether it holds up in the second, which had no say in choosing it. It issues a ROBUST / DOUBTFUL / FRAGILE verdict based on five tests (it still wins out of sample, PF ≥ 1, the two maps resemble each other, the optimum barely moves, and it captured at least half of what there was to win). It is the antidote to overfitting.

⚖️ Net/DD efficiency

Net Profit divided by the maximum fall (drawdown): the return per unit of risk (Calmar-style). It tells «makes a lot but with scares» from «makes solid money quietly». Available as a heatmap metric, a table column and a card in the Verdict.

⬇ Export to CSV

The ⬇ CSV button saves the full table to a file that Excel opens directly (; separator, UTF-8), with a metadata header: symbol, period, direction and mode.

💡
How to read it

If the optimum falls on a small TP with a wide SL, the market drifts gently in your favor: it pays to take profits early and give the stop some air. If it falls on a wide TP with a tight SL, there is momentum: let the winners run and cut the losers fast. And always remember that this measures the market's bias, not a strategy: use it as the bar your entries with an edge must beat, and confirm it in the Robustness tab before trusting a single number.

When the candle touches the TP and the SL at once

If one bar touches your take profit and your stop, daily data does not say in which order it happened. A decision has to be made, and what matters is that the same decision is made everywhere in the program: it would be all too easy for the backtest engine to write the bar off as a loss while this Map resolved it by the candle's sign, counting it as a win if it closed up. Two verdicts for the same day.

The result: the Map recommended a combination that the backtest then failed to reproduce. And the Map exists precisely to choose TP and SL.

One rule now governs: a tie = stop

It is the right one for three reasons. Without the intrabar detail, the only honest assumption is the worst one. The optimism piles up precisely on the tight TP/SL strategies, which are the ones producing the most ties. And a backtest should err on the pessimistic side, never the other way round.

With 1-minute data there is no need to assume: if you choose Settings → Inside the bar → 1 minute, the Map (on CPU and GPU) looks at the minutes of each tie and counts the trade as a winner if the TP was hit first. The same rule as the backtest.

Brace yourself, because the Map gets harsher. Measured on daily @ES:

TP 1% / SL 1%
2,276.7 → 176.8
−92%
TP 1% / SL 2%
2,557.1 → 1,475.4
−42%
TP 2% / SL 1%
4,195.5 → 2,838.5
−32%

In the first one, 32 trades out of 1,718 changed sides —1.9%— and they took 92% of the profit with them. That quadrant passed for profitable and was on the verge of not being so.

The effect concentrates on the small targets; with wide TPs and SLs almost nothing changes (24 cells out of 200). If you ever chose a tight TP/SL by looking at this map, it is worth looking again.

Long calculations and laptops

  • ·With intraday data, the default range is TP/SL from 0.25 to 2.5 % in steps of 0.25. On daily data it is still 1 to 25 %.
  • ·The progress bar shows «~X left». If the calculation is going to take more than 2 minutes, it pauses and asks whether to continue, with ideas to shorten it (fewer combinations, a bigger step, a higher timeframe).
  • ·An integrated GPU (the usual one in a laptop) is no longer used for calculations: the CPU does it, and the screen never freezes. On dedicated GPUs, each launch is short and, if it cannot cope, it falls back to the CPU.

In dollars, with the best and worst marked, and by period (November 2026)

  • ·Amounts in dollars. The map uses the point value from the symbol sheet ($50 on @ES, $20 on @NQ…), with 1 contract. Up to 1.2.0 it showed points without saying so. If the symbol has no sheet, it says so and shows points.
  • ·Whatever is open at «To» is discarded. A trade that has touched neither the TP nor the SL at the end of the period counts as Discarded, even if there is data loaded afterwards. Before, it was closed with the later data, and the best combination could change depending on what you had loaded.
  • ·Heatmap: ★ marks the best combination and ✕ the worst for the chosen metric (not for Trades or Discarded, where «more» is not «better»). The bottom bar names them.
  • ·By period: two short tables, Years and Month of year (every January, every February…), with the best and worst combination of each and the rank of the best combination over the whole period; a minimum trades selector stops a combination with a single trade from winning a period. Below, a chart with the combination over time (the best one, or the one you pin in the Heatmap): bars with its net profit per quarter or per month and a line with its rank in each. Each trade counts in the period in which it enters, within the same continuous run. And in the Heatmap, the «% years +» metric colours each TP/SL by how many years it made money: a profit maximum is usually a peak; an area that wins almost every year is a plateau, and plateaus hold up better out of sample. It is computed by the CPU engine («One at a time» always uses it).
  • ·Robustness: the optimum, the correlation and the capture are now all measured on net profit, and the tables also show net profit and trades. Before, the capture used the average per trade and could say «captured 178 %» when in money it was 87 %.

How to read «By period»

The tab answers one question: is the best combination consistently the best, or does it all come from a few periods? The two tables (Years and Month of year) give the best and worst of each period and the rank of the best combination over the whole period. The chart «The combination over time» follows a single combination: the best overall or the one you pin with a click in the Heatmap.

The bars

Its net profit in each quarter or month, adding up all the trades that entered in that period, whenever they end. Green if together they won; red if they lost. Left scale, in money.

The blue line

Its rank in each period against all the combinations (among those that reach the chosen minimum of trades). Top, «best»: it was first. Middle, 50: average. Bottom, «worst»: among the last. A line that jumps around is a combination without consistency; one that stays at the top almost always can be trusted.

A real example: daily @ES 2000-2020, «Overlapping», TP 25 % / SL 20 %

In «Overlapping» the map opens a trade every day and each one lives until it touches the TP or the SL; with such wide targets they last months or years. The entries of the same quarter share almost the same fate, so the bars come out in blocks that follow the history of the market:

Entries inWhat happenedBars and rank
2000-2002They bought near the dot-com top and hit −20 % in 2001-2002🟥 red · bottom
2002-2003They bought near the bottom and reached +25 %🟩 green · top
2004-2007The market was rising, but they did not reach +25 % before the 2008 crisis took them out at −20 % (the one of 2 Jan 2004 exited on 10 Oct 2008)🟥 red · bottom
2009-2018Long bull market: everything ends up touching +25 %🟩 green · no. 1 almost every year
late 2019-2020The COVID crash took them out at −20 %; what entered later was still open at «To» and is discarded🟥 red · then almost nothing

The reading: TP 25 % / SL 20 % in «Overlapping» is, in practice, buy and hold with a very wide band. It has no edge of its own: it is among the worst from 2000 to 2008 and the best from 2009 to 2017 only because the market rose. It is the same thing the Edge or market? check measures, and the chart shows it at a glance.

  • ·Look for consistency, not records. Winning a single year or quarter is easy for one of hundreds of combinations. What matters is repeating: look at the summary («it was the best in X of Y years, in the top 10 % in Z») and at the Heatmap metric «% years +», which colours each TP/SL by how many years it won. A wide green area (plateau) is more reliable than the point of maximum profit (peak).
  • ·Raise «Min. trades in the period». With «One at a time» and large targets, many years are won by a combination with a single trade. With 3 or 5 in Years, the table says much more.
  • ·In «Overlapping», the amounts are not a real account. There is one trade open for every day, hundreds at a time, so the figures (millions per quarter) are for comparing combinations with each other, not as an expected profit. For realistic amounts, «One at a time».
  • ·Wide targets = the market cycle. With a large TP and SL, the result of each period is decided by the market phase (bull or bear), not by the combination. With short targets (TP 2 / SL 2) the blue line should move without following the big cycles; if it still stays at the top, then there is something.
  • ·«Month of year» adds up every January, every February… to see whether a combination suits some months better than others. With 20 Januaries, a small difference between months may be chance: take it as a hint, not as a rule.
  • ·The breakdown is computed by the CPU. In «Overlapping» with the Auto engine the GPU is used, and it does not split by month: the tab explains it and the «Compute on the CPU» button repeats it with the same settings.
Try it yourself

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

← Previous
Seasonal optimizer
Next →
AQ Holding Profile: how long to hold
More in Market study