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.

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.

Try it yourself

AniQuant can be tried free for 30 days, with every module and no card.

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