About and method

How the studies are made

What the engine does to an idea before it gets a verdict, and how to read the numbers it publishes.

From manual to algorithmic

IDFX Trading started out trading by hand: reading charts, taking setups, managing trades. Over time the question changed from “does this setup look good?” to “does it actually work, over hundreds of trades I didn’t pick?” Answering that honestly takes code.

So I went from manual to algorithmic trading, and built an engine that tests ideas properly. This site is where its studies are published, for free: the popular setups, the requested ones, and the ones that turn out not to work.

One spec, compiled twice

A strategy in the engine is never hand-written code. It is a declarative spec: the indicators it uses, the conditions that open a trade, and the rules that close one. That one document is compiled twice: once to a Python signal graph that the backtester runs, and once to Pine Script v6 for TradingView.

Strategy specindicators · entries · exits
Pythonbacktest · optimize · walk forward · verdict
Pine Script v6the same rules, on TradingView

Because both come from the same source, the script on the chart and the backtest it was judged on cannot quietly drift apart. If a rule exists in one, it exists in the other.

An honest backtest

A backtest can flatter almost anything. These rules are built into the engine and covered by its tests:

  • No lookahead. A signal on one bar fills at the open of the next. Levels used at entry come from the last closed bar.
  • Pessimistic inside the bar. If a bar touches both the stop and the target, the engine assumes the stop was hit. Candle data cannot show which came first.
  • Risk-based sizing. Each trade risks the same amount, sized from its stop distance, so a wide stop never quietly becomes a bigger bet. That is why results are in R: one R is the amount risked per trade.
  • Daily limits hold for pending orders too. Trade caps and cooldowns are checked when an order fills, not only when it is placed.

Walk-forward, out-of-sample

An optimized backtest tells you which settings were best on the data they were tuned on. That is not evidence of anything. Walk-forward testing asks the question that matters: if you had picked the settings using only the data available at the time, would they have worked next?

The history is cut into folds. Each fold tunes the strategy on its training window, then trades the next window once, with the settings frozen. Those test windows, stitched end to end, make an equity curve that nobody fitted. That curve, and the metrics from it, are what the studies publish.

Fold 1
Fold 2
Fold 3
Fold 4
Fold 5
Result
Fit parameters (in-sample)Trade them, frozen (out-of-sample)time →

What the verdict means

After walk-forward, the engine tries to break the result and grades what is left. A failed critical check rejects the idea outright; smaller failures lower its score.

Strong

Passed every critical check and scored 85 or more. Worth publishing, and worth forward-testing on a demo account.

Promising

Passed every critical check, with some weaknesses (a score of 70 to 84). The study names them.

Marginal

No critical failure, but enough smaller ones that the edge is thin.

Not this time

Failed at least one critical check. The study says which, and why.

Critical checks

Positive expectancy
The average out-of-sample trade has to make money.
Sample size
Fewer than 30 out-of-sample trades is a critical failure; under 100 still counts against the idea.
Walk-forward efficiency
Out-of-sample results must keep at least half of the in-sample performance. Less means the optimizer was fitting noise.
Deflated Sharpe
At least a 90% chance the Sharpe ratio survives the number of parameter combinations that were tried.
Probability of overfitting
How often the best in-sample settings land in the bottom half out of sample. Above 25% fails.
Beats shuffled price
The strategy has to do better on real prices than on reshuffled versions of them (p < 0.05).

Other checks

  • Fold consistency: at least 60% of walk-forward folds profitable
  • Robust to trade order: at least 90% of reshuffled trade sequences end profitable
  • Survivable drawdown: at most a 5% chance of halving the account at the tested risk
  • Parameter plateau: neighbouring settings work too, rather than one lucky spike

A grade is a judgement about a backtest, not a forecast. Even a strong result should be forward-tested before anyone trusts it with money.

Why “before trading costs”

The studies ask one question: does this signal have an edge at all? Spread, slippage, commission and overnight financing depend on your broker, your account and your size, so the studies leave them out rather than guess at yours. Every result is labelled before trading costs, every time it is shown.

Costs are real, though. A small edge per trade can disappear once a spread is paid on every entry, and fast strategies with many trades feel it most. Read the expectancy per trade with that in mind. The engine has a realistic-costs mode, and anything that becomes a product is re-tested with it first.

What this is not

Research and education, not financial advice. A backtest is not a live trading record, and none of these studies claim live or prop-firm results. Past results, in or out of sample, do not promise future ones.