StrategyOne

Building and backtesting strategies

▶ Watch the tutorials: a one-minute video for each builder.

The strategy builder turns trading ideas into rules you can test on years of Indian index, stock and option data, without writing code. This guide explains how a strategy is put together, what every keyword means, and walks through complete examples you can copy.

On this page

How a strategy fits together

A strategy is one or more sets, plus settings that apply to the whole strategy.

  • A set is one complete trade idea: an underlying (for example Nifty 50 weekly options), the conditions to enter, the positions to take, and the conditions to exit. A strategy can hold up to 10 sets, each with its own underlying and rules.
  • The whole strategy holds what applies to every set: intraday or positional holding, the safety net that always closes positions, and the universal exit (a target, stop loss or scheduled exit across all sets).
  • Run settings decide the period, charges, slippage, trading days and capital for the backtest.

The Backtester has four tabs: Start to begin from the Idea Builder (describe a strategy in plain words), a preset or your own AI app; Build to edit; Backtest Results to see the latest backtest and check why a day didn't trade; and My Strategies, which opens the Strategies page in the sidebar: every saved strategy from every builder. Saved backtests from every builder are on Backtest Results, and paper trading is on Deployments. The Portfolio tab combines several of them into one portfolio backtest: add saved strategies (each is run fresh over the portfolio's period and counts as one backtest) and saved backtests (combined from their stored day-by-day results, free), give each a multiplier, and see one equity curve, drawdown and monthly table for the whole, each part's figures, how their daily results correlate, and how much combining them cut the worst drawdown. Portfolios save to My Strategies. The builder opens in Guided mode with just the essentials; switch to Advanced for several sets, condition groups, re-entries and the rest (a strategy that uses them always opens in Advanced). Every backtest, the Idea Builder and Agentic BT use backtest credits: your plan adds credits every month, and you can buy more any time. On a computer, the left column lists your sets, the middle shows the selected set, and the right column holds the run settings, the checks, and a plain-English description of what you built. Read that description before every run: it says exactly what the engine will do.

Build your first strategy

This walkthrough builds a classic: sell the Nifty at-the-money straddle in the morning, protect each leg with a stop loss, and take profit when half the premium has decayed.

  1. Name it and choose the underlying. Click New strategy on Home, give it a name in the header, and in Set 1 choose Nifty 50 with Weekly options. Leave Entries per day at 1.
  2. Add the entry condition. Under Entry, add a rule and choose the Time keyword:
    Entry · all of these
    Timeis at or above09:20
    Time compares against the candle just completed, so the rule becomes true when the 09:20 candle closes, and the order fills at the open of the next minute.
  3. Add the positions. Add two legs: sell 1 lot of the ATM call and sell 1 lot of the ATM put, each with a 30% stop loss.
    Positions
    #ActionTypeStrikeLotsStop lossTargetChecked on
    1SellCEATM130%noneCandle high/low
    2SellPEATM130%noneCandle high/low
    For a sold leg, a 30% stop loss closes that leg when its price rises 30% above the entry price. The other leg stays open.
  4. Add the exit condition. Under Exit, use Set P&L % of entry, which measures profit as a percentage of the premium collected:
    Exit · any of these
    Set P&L % of entryis at or above50
    When the straddle has lost half its value, the set closes everything.
  5. Check the whole strategy. Keep Intraday with Close everything by 15:15. Anything still open closes then.
  6. Choose run settings and run. Pick 1 year, set charges per order and slippage to match your broker, then press Save and backtest. The strategy is saved and the Backtest Results tab opens when the backtest finishes.

The plain-English description should now read: Set 1 (Nifty 50 · weekly options): when Time is at or above 09:20, sell 1 lot of the ATM CE, stop 30%; sell 1 lot of the ATM PE, stop 30%. Once a day at most.

Writing conditions

Every condition compares a keyword on the left with a value on the right. The right side can be a Number, a Time, or another Keyword, so you can compare price with an indicator, or one indicator with another.

ComparisonTrue when
> and ≥The left side is above (or at or above) the right side on the candle just completed.
< and ≤The left side is below (or at or below) the right side.
=Both sides are equal. Useful for whole numbers such as Day of week or Is expiry day.
crosses aboveThe left side was at or below the right side on the previous candle and is above it now. True only on the candle where the cross happens.
crosses belowThe opposite: at or above before, below now.

All of these, or any of these

Each condition list is either All of these (every rule must be true) or Any of these (one is enough). Add a group of rules to mix the two, for example: enter when the time is after 09:30 and either RSI is below 30 or price is below the lower Bollinger band.

Entry · all of these
Timeis at or above09:30
Group · any of these
RSI5-minute, 14is below30
LTPis belowBollinger lower5-minute, 20, 2

When rules are checked

Rules are checked every minute, on candles that have closed. A 15-minute indicator updates when its 15-minute candle closes. When a rule becomes true, the order fills at the open of the next minute. The engine never uses a price it could not have known at that moment.

Keyword reference

Every keyword the builder offers, grouped as in the keyword menu. Type to filter by name or meaning.

Settings many keywords share

SettingWhat it does
CandleThe candle size the keyword is calculated on: 1, 3, 5, 10, 15, 30 or 60 minutes.
Candle typeStandard candles, Heikin-Ashi (smoothed candles that make trends easier to read), or Renko bricks of a chosen brick size in points, which ignore time and only move when price moves.
Period, Std devs, MultiplierThe usual indicator settings, for example 14 for RSI, 20 and 2 for Bollinger bands, 10 and 3 for Supertrend.
Apply onWhich price the indicator uses: close, open, high, low, or the averages hl2, hlc3 and ohlc4. You can also apply an indicator to another indicator, for example an EMA of RSI; the inner indicator uses the same candles.
InstrumentReads the keyword from another underlying, for example trade Nifty options only when Bank Nifty is above its 20 EMA. Left empty, it uses the set's own underlying.
SeriesWhat the keyword is calculated on: the underlying price, the ATM call, the ATM put, the ATM straddle, or the traded position, call or put. Traded series follow the actual strikes you hold, not a moving ATM, so they suit exits.
Candles backLooks at an earlier candle, for example the high of the candle before the last.

Positions

Each set's positions are its legs, all opened together when the entry conditions are met.

ChoiceOptions
ContractWeekly or monthly options, futures, or spot / cash. Futures follow the underlying's continuous price, so there are no jumps at the monthly rollover.
Action and typeBuy or sell; CE (call) or PE (put) for options.
StrikeATM ± up to 10 strikes (ATM+2 is two strikes above the money), or by premium: Premium near ₹X, Premium ≥ ₹X (the cheapest at or above), or Premium ≤ ₹X (the dearest at or below). Strikes are picked at the moment of entry.
LotsNumber of lots; the lot size of each date is applied for you.
Stop loss and targetPer leg, in % of the entry price for options (points for futures). For a sold leg, the stop is a rise in price; for a bought leg, a fall.
Checked onCandle high/low closes a leg as soon as any price in the minute touches its stop or target; Candle close waits for a minute to close beyond it.

Add opposite set creates a mirror set: price and indicator conditions are reversed (crosses above becomes crosses below), calls become puts, and futures switch between buy and sell. It's the quickest way to trade both directions. Duplicate copies a set as it is.

Exits and re-entry

A set's trade can close in several ways, whichever comes first:

  • Leg stop losses and targets close one leg at a time.
  • The set's exit conditions close the whole set. Keywords made for exits include Set P&L (₹), Set P&L % of entry, Traded price change %, Leg price, Leg P&L and Minutes in trade.
  • The universal exit closes every set at once: a profit target and stop loss (a day for intraday, per execution for positional), or a scheduled exit on a chosen weekday and time.
  • The safety net closes everything regardless of rules (see the next section).

Entering more than once a day

Set Entries per day above 1 and two more choices appear: Wait after an exit (minutes before the set may enter again) and Re-enter after any exit, a loss only, or a profit only. A set never holds two trades at once.

After a universal exit

Re-enter after a universal exit decides when the strategy may trade again: 5, 15 or 30 minutes later, 1 or 2 hours later, the next trading day (the default), the next week, or on a chosen weekday. After a short wait on an intraday strategy, the day's profit and loss limits count afresh from the moment it re-enters.

Holding, expiry and the safety net

Intraday strategies close everything by the Close everything by time each day, whatever the rules say, and start no new trades after it.

Positional strategies hold trades overnight until an exit fires. Two settings matter:

  • Close positions held longer than a number of trading days, at a chosen time. This is the positional safety net: a position whose exit rules never fire would otherwise stay open until the end of the backtest. These exits show as Holding limit.
  • At expiry, for options: Exit the trade at a chosen time on expiry day; Roll to the next expiry, which closes at that time and re-opens the same legs in the next expiry the next morning; or Do nothing, which holds the options through expiry and settles them at the closing prices.

The universal exit's target and stop loss measure a positional strategy per execution: from the first position it opens until every set is flat again, across days.

Run settings

SettingWhat it does
Backtest period6 months, 1 year, 2 years, 3 years, or custom dates. Presets end on the latest day stored for your underlyings; a note warns when data starts later or has gaps.
Charges per order₹ for each order. Every leg is two orders, its entry and its exit.
SlippagePoints lost on every fill: buys fill that much higher, sells that much lower.
Trading daysThe weekdays the strategy may trade on.
CapitalThe starting amount used for returns, drawdown percentages and the equity curve.
Performance reportAdds returns by month, drawdowns and ratios against buy and hold.
EngineServer is usually fastest. Browser runs the same engine in your browser with no time limit; both give identical results.

Each backtest and probability engine run uses backtest credits; the cost is shown beside its Run button before it runs, and your plan adds credits every month. See Credits to buy more.

Saving, exporting and deleting strategies

Save keeps the strategy in your account, under Saved strategies. Export downloads it as a file and Import opens one. Delete removes the strategy you have open, for good; if it's shared for debugging, the sharing stops too. It stays on screen as an unsaved strategy until you leave the page, so you can still save it again.

Reading the results

  • The headline compares the strategy's return with simply holding the underlying, alongside final equity.
  • How trades ended shows, per set, the trade count, win rate, P&L, and the exit reasons, such as Exit condition, Square-off, Leg stop, Strategy target or Holding limit.
  • Daily results and the trades list show every trade with its legs, entry and exit prices. Why shows the values that made each entry and exit fire, and Chart plots the trade (see Check every trade on the chart).
  • The performance report adds net P&L, yearly return (the average year, on the fixed capital), maximum drawdown, Sharpe, Sortino and Calmar ratios, volatility, winning days, profit factor, streaks, a drawdown chart, a monthly heatmap and the five worst drawdowns.

Press Save backtest to keep a result in History. To get help with a strategy, use Share for debugging: our team can open it for seven days and reply on the page.

A good backtest is a starting point, not a promise. Test across different periods, include realistic charges and slippage, and be wary of rules tuned until the past looks perfect.

Trading the next expiry

Each option leg has an Expiry choice next to its strike: This week (or This month on monthly contracts) trades the nearest expiry, and Next week (Next month) the one after it. Calendar spreads mix the two: sell this week's ATM call and buy next week's, for example.

  • A next-week leg is followed as its own contract: held positionally, it carries on past this week's expiry and closes on its own expiry (or rolls, as you set).
  • The next week's options are collected for the weekly indices every day from now on, and come from imported option-chain files. Days without them are skipped, and the results' notes say so.
  • The trade chart shows a next-week leg with its expiry date.

Check every trade on the chart

The quickest way to know a strategy works as you meant is to look at its trades. In the results, press Chart on any trade to open that day's candles:

  • The index (or the stock), with the entry and exit times marked.
  • Every leg: each option's premium (or the futures or stock price), titled with its entry and exit prices and why it closed, such as Leg stop loss, Leg target, Exit condition or Square-off.
  • The entry and exit drawn as dashed lines with a dot at the price, so you can see exactly where each trade went in and came out.
  • 1, 5 or 15-minute candles: switch with the buttons above the chart.

Use it with Why, which lists the values that made the entry and exit fire, to check things like: did the entry happen at the right time; did the stop trigger where you expected; did the strike match what you chose? For a positional trade, the chart shows the entry day.

If something looks wrong, check the strategy's rules first; still puzzled, use Share for debugging and the team can look at the same trade.

More example strategies

Opening range breakout, buying options

Buy an ATM call when Nifty breaks above its first 15 minutes' high, intraday, with up to 2 entries a day after a loss.

Entry · all of these
LTPcrosses aboveOpening range highfirst 15 minutes
Positions
Buy 1 lot of the ATM CE, stop 25%, target 50%
Set options
Entries per day 2 · Re-enter after a loss only · Wait 15 minutes

Then press Add opposite set for the put side: it buys the ATM put when price crosses below the opening range low.

EMA trend in futures, positional

Hold Nifty futures while the 15-minute price stays above its 50 EMA, with a 5-day holding limit as the safety net.

Entry
LTPcrosses aboveEMA15-minute, 50
Exit
LTPcrosses belowEMA15-minute, 50
Whole strategy
Positional · Close positions held longer than 5 trading days at 15:15

Expiry-day straddle with a sentiment filter

Sell the straddle only on expiry days when put-call ratio shows balance, and exit on a 20% rise in the traded straddle.

Entry · all of these
Is expiry dayequals1
PCR (OI)ATM ± 5 strikesis between0.8and1.2(two rules: ≥ 0.8 and ≤ 1.2)
Timeis at or above10:00
Exit · any of these
Traded price change %of the positionis at or above20
Set P&L % of entryis at or above60

Mean reversion with two timeframes

Buy an ATM call when 5-minute RSI is oversold while the 60-minute trend is up, read from Supertrend.

Entry · all of these
RSI5-minute, 14crosses above30
LTPis aboveSupertrend60-minute, 10, 3
Exit · any of these
RSI5-minute, 14is above70
Minutes in tradeis at or above90

Privacy of your strategies

Your strategies and backtests are private to your account. Other users never see them, and our support team can't open them.

Sharing for debugging

The only way our support team can see a strategy is if you share it for debugging. While it's shared, they can open and run it (they can't change it) for up to 7 days; you can stop sharing at any time, and you'll see their reply when they're done. A notice in the Backtester shows whenever one of your strategies is shared.

Private run: keep a strategy off our servers

Choose the Browser engine and tick Private run. The strategy is then kept in your browser on that device and is never saved on our servers, and the backtest runs on your own computer. Our server only supplies the market data the run needs: which underlying, which dates and which option strikes. The rules themselves never leave your browser. The results aren't saved on our servers either; download the PDF report to keep them. The performance report is the one exception you choose: it's calculated on our server from the daily profit and loss (not your rules), so Private run only builds it when you ask, and nothing is saved.

A private strategy lives in that one browser: clearing the browser's data, or using another device, means it's not there. Use Export to keep a file copy, and Import to bring it back.

Strategies you save to your account are stored on our servers, as with any online service. Private run is for when you'd rather nothing about the strategy is stored.

If you connect an AI app to the Backtester, the strategies it reads or writes for you pass through that app's service under its own terms.

For the full details, see the Privacy policy and the Terms of use.

Rolling Straddle Chart

The Rolling Straddle Chart shows an index through the day, with its rolling ATM straddle underneath: at each minute the ATM strike is the index rounded to the nearest strike, and the straddle is that strike's call plus put. Orange lines mark each change of ATM strike, and a dashed line shows the straddle at the opening ATM for comparison. Choose a strike under Straddle to follow one strike's call plus put all day instead.

  • Today (live) updates every minute while the market is open, and shows the last session when it's closed. Live straddle prices are taken once a minute for the strikes near the money (ATM ± 2) of the nearest expiry, so a strike further from the money has gaps.
  • Past days draws any stored day from the Backtester's data, with every strike. It's part of the paid plans.

Point at either chart to see the time, the index prices, the ATM strike, and the call, put and straddle values at that moment.

Chart Patterns

Chart Patterns finds ten classic patterns on any index or stock with stored prices (Nifty, Bank Nifty, Sensex and the stocks), intraday on 5, 15 and 30-minute candles and positionally on 60-minute and daily candles: double top and bottom, head and shoulders and its inverse, ascending, descending and symmetrical triangles, rising and falling wedges, bull and bear flags, and range breakouts.

  • Scanner: pick an instrument and a session (or Intraday / Positional for the timeframes) to see each timeframe's chart with the patterns drawn on it, the breakout candle, the target (the pattern's height projected from the breakout) and the stop (the other side), what followed, and where timeframes agreed (within the hour, or two of the longer timeframe's candles). The 60-minute chart covers the last 5 sessions and the daily chart the last 120 days. On the latest session it also lists the patterns still forming.
  • How they played out: every confirmation in the instrument's stored history, by pattern and timeframe: how often it reached its target before its stop within 20 candles, how often Nifty had moved its way 6 candles later, and the average moves. Small counts mean little.
  • In the Backtester: the Chart pattern keyword (under Chart patterns) is +1 on the candle a bullish pattern breaks out, −1 for a bearish one, and 0 otherwise, on any underlying and timeframe. For example, enter when Chart pattern (Double bottom, 15-minute) = 1.

A pattern counts only once a candle closes beyond its level, and only candles up to that one are used, so there's no hindsight.

Use the Backtester with AI agents

You can connect an AI app such as Claude to the Backtester. Ask it in plain words, for example “Build a Nifty weekly short straddle at 09:20 with a 30% stop on each leg, backtest it for 2025, then try 25% and 35% stops and compare”. It writes the strategy, checks it, runs the backtests and reads you the results.

It can also use the probability engines your plan includes: ask, for example, “On the Options engine, how often has the Nifty weekly ATM straddle lost 30% by 15:15 on expiry days over the last three years, and was it better than chance?” It reads the scenario format, can start from the ready-made scenarios (including any Researched presets), tests the scenario and reports how often the outcome followed, against the baseline, with a chance figure and a year-by-year breakdown. Each test counts against your daily runs, like a backtest.

Connect it

  1. Copy the connector address from Settings → AI apps.
  2. In your AI app, add a custom connector (in Claude: Customize → Connectors, or Settings → Connectors) and paste the address.
  3. You're sent to StrategyOne: sign in if you need to, check what the app may do, and press Allow.

What it can do

See the underlyings and their data dates and the strategy format; list, open and save your strategies (it can't delete them); run backtests and read their results. Each run uses backtest credits, the same as running it yourself, and waits in the same queue when the server is busy. Strategies it saves appear in your Backtester, and every backtest it runs is saved to My Strategies (marked “via your AI”), where it opens with the full report like any other.

Private run isn't available through AI apps, because the app runs backtests on our server. The strategies an AI app reads or writes for you pass through that app's service under its own terms.

Disconnect

Settings → AI apps lists every app you've connected, with when it was last used. Disconnect stops its access straight away.

How the engine fills trades

  • Every minute, the engine checks rules on candles that have closed. When a condition is met, the trade fills at the next minute's open, plus or minus slippage.
  • Option prices come from stored one-minute candles for each strike. When a strike has no trade in a minute, the last known price is used.
  • Indicators warm up on earlier data, so the first day of a backtest already has valid values.
  • Keywords based on open interest (PCR, OI change %, Max pain) need OI history for the dates you test; where it's missing, those conditions are not met.
  • The engine is the same on the server and in your browser, and both give identical trades.

Questions about a result? Use Share for debugging on the strategy, and we'll take a look.