OptionDesk

How to Backtest an Indicator Signal on OptionDesk

Indicator based option backtesting, step by step: set entry and exit rules in /backtest/signals, pick the option structure to trade, and the next-bar-open fill.

Updated 2026-11-28 · 8 min read

On this page
  1. What does this screen do?
  2. How do you run one?
  3. What do the numbers mean?
  4. A worked example
  5. Does the rule hold on data it was not tuned on?
  6. What mistakes do traders make?
  7. Next step

/backtest/signals triggers a trade from a technical condition — RSI crossing a level, a Supertrend flip — instead of a fixed clock time, then runs that rule against real historical data on options, futures or stocks. This page walks through the four steps on the screen and what the fill rule protects against.

Every rupee figure on this page is hypothetical. It comes from backtested runs on historical NSE data — projected, not advice, and not indicative of future results. Every trade is sized at today's lot size.

Entry rules built from indicator conditions, with the option structure the signal opens underneath. The same engine and cost model as the time-based backtester. Entry rules built from indicator conditions, with the option structure the signal opens underneath. The same engine and cost model as the time-based backtester.

What does this screen do?

A manual backtest on /backtest opens a structure at a fixed clock time every qualifying day. /backtest/signals opens it when a condition becomes true instead — RSI(14) crossing below 30, or a moving-average cross — and can also close it on a separate condition rather than a fixed exit time. The indicator decides when; you still decide what gets traded once it fires.

It is not a second, independent engine. The archive, the cost model, and the fill mechanics are the same ones the manual backtester uses. The only thing this screen changes is what triggers the entry and exit — a rule instead of a clock.

It is also not the tool that tells you whether an indicator's edge is durable. A signal backtest reports what a rule would have done on the data it was given, once, over one period. Whether that result survives on data the rule was never tuned on is a separate question — the one /backtest/walk-forward is built to answer, and it requires the signal to be saved first.

How do you run one?

Step 1 — "What are you testing?" hint: asset, symbols, timeframe and period. Set TEST ON to Options, Futures or Stocks. Pick the UNDERLYING for options or futures, or a STOCKS picker (Nifty 50, Nifty 100, Nifty 200, F&O stocks, or All stocks, up to 25 symbols) for a stock test. Set the TIMEFRAME the indicator is computed on, the PERIOD (1M, 3M, 6M, 1Y, 2Y or Custom), and a DIRECTION filter if you only want long or short signals.

Step 2 — Entry rules. hint: what has to be true for a trade to go on. Add one or more conditions with "+ Add condition" — an indicator crossing a level, two indicators crossing each other, or a value staying above/below a threshold. "Enter N bars after the signal fires" lets you delay entry by a fixed number of bars past the condition, if you want to test a confirmation lag rather than an immediate reaction.

Step 3 — Exit rules. hint: optional — otherwise it exits on risk or the clock. If left empty, the position exits on whatever stop, target or time-based rule is set elsewhere on the screen. "Also exit after N bars" adds a maximum holding period in bars, independent of any indicator-based exit condition.

Step 4 — The option structure or the stock position. With TEST ON set to Options or Futures, this becomes "The option structure": LOTS, EXPIRY CYCLE, the leg or legs to trade when the signal fires, a Trail SL setting, and "Add leg" for a multi-leg structure. With TEST ON set to Stocks, it becomes "Stock position": PRODUCT (intraday/delivery), SHARES, and SIZE BY (a fixed quantity or a capital-based sizing rule).

The collapsed panels. Risk and exits, Scaling in and out, and Costs sit folded below, each editable without leaving the flow — the same three cost-and-risk controls the manual backtester exposes, applied here to a rule instead of a fixed time.

Two design choices in this flow are easy to overlook. First, "Enter N bars after the signal fires" and "Also exit after N bars" exist as separate settings from the entry/exit conditions themselves — a rule can fire cleanly on the condition and still have its actual fill delayed or capped by bars, which changes the result independent of the condition's own accuracy. Second, DIRECTION filters which signals are even considered before a single backtest runs — leaving it unset when you only actually want long entries, for instance, silently doubles the trade count with the opposite side mixed in.

What do the numbers mean?

Once the run finishes, the output matches the manual backtester's results panel — net P&L after costs, win rate, max drawdown, the trade log, and the entry/exit breakdowns. The one thing worth checking first on a signal backtest specifically is trade count: a tight condition on a short PERIOD can produce very few trades, and a result built on a handful of fills says little about the rule regardless of how good those fills look.

The fill rule stated on the screen matters for reading every row of the trade log: a signal is decided on a bar's close and filled at the next bar's open. That means the entry price in the log is never the exact price that triggered the condition — it is the next bar's open, which is the price a live trader could actually have gotten, not one a look-ahead-biased backtest would quietly assume.

A worked example

One rule, one structure, a full calendar year. NIFTY, 5-minute bars, 1 Jan to 31 Dec 2025. Entry: RSI(14) on the close crosses above 30. Structure: buy one at-the-money call, 1 lot, nearest weekly expiry. Exit: a 30% stop on the premium, otherwise square-off at 15:15 IST. Brokerage ₹20 an order, slippage 0.25% of premium a leg, statutory charges at the rate in force on each date. All figures projected, not advice, from a historical simulation:

Reading Value
Trades 119
Net P&L (after costs) -₹84,500
Win rate 21.0% (95% interval 14.7% to 29.2%)
Max drawdown -₹87,583
Profit factor 0.49
Expectancy per trade -₹710
Longest losing run 17 trades
Exit mix 72 on the stop, 47 on the clock
Costs and slippage ₹7,071 and ₹3,967

This one loses, and the reason is readable. Buying a call after RSI recovers through 30 makes a long-premium position, which decays every minute it is held, and a 30% stop on a premium that moves several percent in minutes fires often: 72 of 119 trades ended on it. The losing run of 17 trades is the figure most traders would not have sat through. Nothing here says RSI is a poor indicator. It says this rule, with this structure and this stop on this year, did not pay, and that the screen shows why in the exit mix.

Does the rule hold on data it was not tuned on?

A single run cannot say. Save this rule and send it to walk-forward to see how the RSI level and the stop behave when tuned on one slice and scored on the next. A time-based version of a structure, entered at a fixed clock time, is covered in your first backtest.

What mistakes do traders make?

Tuning the entry condition to the test period. If RSI 28/72 backtests better than 30/70 over the same few months, that is more likely noise than a durable edge — narrow parameter ranges rarely distinguish themselves reliably on one PERIOD.

Setting TEST ON to Stocks or Futures when the intent is options. An indicator computed on spot and traded through a stock or futures position is not the same instrument, latency, or cost profile as an equivalent option structure — check TEST ON matches what you actually intend to trade before reading the result.

Leaving Exit rules empty without checking what fills the gap. An empty Exit rules step doesn't mean "no exit" — it means the position exits on risk or the clock, whichever is set in the collapsed Risk and exits panel or the structure step. Confirm that's the exit you meant.

Treating a high trade count as safety without checking the regime. More trades over one continuous period is still one regime's worth of data. A rule needs to survive multiple periods, which is a question for /backtest/walk-forward, not this screen alone.

Next step

Build a signal from the 80 available studies at /backtest/signals, apply it with Costs on, and read the trade log before the summary card. When a rule looks promising, save it and take it to /backtest/walk-forward to see if it holds up on data the rule wasn't tuned on.

Common questions

What does the signal backtester on /backtest/signals actually do?
It triggers a trade from a rule built out of technical conditions — from 80 available studies — instead of a fixed clock time, then trades that signal on options, futures or stocks with the same 1-minute archive and cost model as the manual backtester. A signal is decided on a bar's close and filled at the next bar's open, never the same bar's close.
What indicators can I backtest on NIFTY options?
80 studies, spanning trend (moving averages, Supertrend), momentum (RSI, MACD, stochastics) and volatility families, selectable while building Entry rules or Exit rules on /backtest/signals. Each is computed on the chosen underlying's price series.
Can I backtest a Supertrend strategy on BankNifty futures instead of options?
Yes. The TEST ON control at the top of /backtest/signals switches between Options, Futures and Stocks, and the same 80 studies apply across all three — a Supertrend flip can open a futures trade, a stock trade or an option structure depending on that setting.
Does /backtest/signals fill at the bar's close or the next bar's open?
The next bar's open. The screen states this rule directly: a signal is decided on a bar's close, and the trade fills at the following bar's open — never the same bar it was decided on, which would hand the backtest a look-ahead advantage no live trade could have.
Can I add a stop-loss or trailing stop to an indicator-triggered structure?
Yes. Once entry and exit rules are set, the option structure or stock position panel includes its own Trail SL setting, and the collapsed Risk and exits panel holds further stop and target rules — each exit, whichever one triggers it, is filled and costed the same way a manual exit is.
Is /backtest/signals different from a walk-forward test of the same rule?
Yes. /backtest/signals runs the rule once across a chosen period and reports one result. Whether that result holds up on data the rule wasn't tuned on is a separate question answered at /backtest/walk-forward, which requires the rule to be saved first.
How many symbols can I test a stock signal on at once?
Up to 25, chosen from Nifty 50, Nifty 100, Nifty 200, F&O stocks, or All stocks, when TEST ON is set to Stocks. Options and futures signals run against a single underlying instead.

Disclosures

  • Not investment advice. OptionDesk provides tools, analytics, backtesting and education for NSE F&O only. It is not a SEBI-registered Investment Adviser or Research Analyst, and does not provide investment advice, buy/sell calls, tips or trade execution. You place every order yourself, through your own broker.
  • Projected, not promised. Every projected figure — payoffs, max profit/loss, probability of profit, target-date P&L and similar estimates — is “projected, not advice.” Backtested and simulated results are hypothetical, do not represent actual trading, and are not indicative of future results.
  • Delayed market data. Market data shown on OptionDesk is delayed by approximately one minute — it is not a live feed. It is provided for analysis and education only, and must not be relied on for time-sensitive execution.
  • F&O risk. Trading in futures & options carries a high risk of loss and is not suitable for every investor. Consider your objectives and risk tolerance, and seek independent advice where appropriate.

More in Test