Narrow CPR Scanner Free Tool — Daily & Weekly NSE Bhavcopy Scanner
Narrow CPR · Stock Scanner
Read article →
There are no items in your cart
Add More
Add More
| Item Details | Price | ||
|---|---|---|---|
Quick Answer: To backtest a trading strategy, write fixed rules for Entry (A), confirmation, Stop Loss (B) and Target (C), apply them to several years of past data, record every trade with costs, and then study expectancy, drawdown and the longest losing streak before you use real money. A backtest shows how rules behaved in the past. No outcome is assured.
Definition: Backtesting (purane data par rules ki jaanch) means applying a fixed set of trading rules to historical prices and recording what every trade would have returned.
Most traders learn a setup from a video, try it for three days on a live account and then decide it does not work. That is an expensive way to test an idea. When you backtest a trading strategy first, past charts do the teaching and your account does not pay the fee. I teach this habit to my students and follow it myself.
The stakes are real. Press reports of SEBI studies say about 91% of individual F&O traders had net losses in FY25 and 87.7% in FY26. Please verify the latest figures on the official SEBI site. Backtesting does not remove that risk, but it forces you to know your rules before the market tests you.
Backtesting means running your exact trading rules on past price data to see how they would have behaved. It shows win rate, losing streaks, drawdown and costs before you risk any money. It cannot predict the future, so use it to reject weak ideas, not as proof that a strategy will work.
A backtest answers three practical questions. Do the rules earn more than they lose after costs? How long can a losing streak run? Can your account, and your mind, survive that streak? If you cannot answer these with numbers, you are not trading a strategy yet. You are trading a hope.
Backtesting uses past data. Forward testing (aage ke live data par jaanch) uses data the rules have never seen. You need both, in this order: backtest, forward test, then real size. If you want the chart logic behind rules like these, my trading books explain it step by step.
Write fixed rules, choose one market and timeframe, test on several years of data, log every trade with costs and then study expectancy and drawdown. Work bar by bar so you never use information that did not exist at that moment. Only then move to forward testing.
Take one rule set, apply it to 40 trades and calculate the result before and after costs. In the illustrative example below, the same 40 trades show Rs 16,000 before costs but only Rs 4,000 after costs. That gap is why every backtest must include costs.
All figures here are illustrative and simplified. I assume every winner reaches its full target, every loser hits its full stop and Rs 300 covers costs and slippage per trade. Greeks are ignored, so treat this as index points on a chart. Here is the rule card:
| Element | Rule (illustrative) |
|---|---|
| Entry (A) | 15-minute candle closes above the previous day high, at 24,500 |
| Confirmation | Price above the CPR and futures volume above the last five-candle average |
| Stop Loss (B) | 40 points below entry, at 24,460 |
| Target (C) | 80 points above entry, at 24,580 |
| Reward to Risk Ratio | 1 : 2 (a teaching guideline; there is no official minimum) |
| Position sizing | Risk Rs 2,000 per trade ÷ 40 points = 50 units. Check the current NSE lot size and round to valid lots. |
| No-setup condition | No close above the previous day high by 1:00 pm means no trade |
| When NOT to trade | Scheduled big events when you cannot define the stop, or when one lot risks more than your Rs 2,000 limit |
Here 1R means the Rs 2,000 you risk per trade. The chart below draws the levels to scale.
Now the 40-trade record: 16 winners and 24 losers, a 40% win rate.
| Measure | Calculation | Result |
|---|---|---|
| Gross gains | 16 × Rs 4,000 | Rs 64,000 |
| Gross losses | 24 × Rs 2,000 | Rs 48,000 |
| Result before costs | Rs 64,000 − Rs 48,000 | Rs 16,000 |
| Costs and slippage | 40 × Rs 300 | Rs 12,000 |
| Result after costs | Rs 16,000 − Rs 12,000 | Rs 4,000 |
| Expectancy per trade, before costs | Rs 16,000 ÷ 40 | Rs 400 (0.2R) |
| Expectancy per trade, after costs | Rs 4,000 ÷ 40 | Rs 100 (0.05R) |
| Gain-to-loss factor, before costs | Rs 64,000 ÷ Rs 48,000 | 1.33 |
| Gain-to-loss factor, after costs | Rs 64,000 ÷ (Rs 48,000 + Rs 12,000) | 1.07 |
| Longest losing streak (7 trades) | 7 × (Rs 2,000 + Rs 300) | Rs 16,100, or 3.2% of an assumed Rs 5,00,000 account |
Take Vivek, an illustrative student. His setups looked like clean 1:2 trades, so he felt ready. After adding costs the edge shrank to 0.05R per trade, and a seven-trade losing streak would cost him 3.2% of his account. He did not go live. He tested a stricter confirmation rule instead. That is a backtest doing its job.
Expectancy, maximum drawdown and the longest losing streak matter most, with the trade count as a trust check. A high win rate alone says little, because the average win and average loss decide the result.
| Number | What it tells you | How to get it |
|---|---|---|
| Expectancy (har trade ka ausat result) | Average result per trade; it must stay above zero after costs | (Win rate × average win) − (loss rate × average loss) |
| Gain-to-loss factor | How much you gain for each Rs 1 you lose | Total gross gains ÷ total gross losses plus costs |
| Maximum drawdown (capital mein girawat) | Deepest fall from an account peak to the next low | Largest peak-to-trough drop in the equity curve |
| Longest losing streak | The pain test for your account and mind | Count the longest run of consecutive losers |
| Trade count | How much to trust the other numbers | Number of completed trades |
| Average Reward to Risk Ratio | Whether winners really paid more than losers cost | Average win ÷ average loss |
There is no official cut-off for a “good” number. Guides disagree on how many trades are enough, and the range you will see runs from about 30 to several hundred. Test, pick one rule such as “expectancy above zero after costs over at least 100 trades”, and stick to it.
The most common mistakes are over-fitting the rules, using information the market had not yet shown, ignoring costs, testing too few trades and cherry-picking good days. Each one makes a weak strategy look strong on paper.
| Mistake | Why it hurts | Practical fix |
|---|---|---|
| Over-fitting | Tuning settings until the past looks perfect; the rules then fail on new data | Use few rules. If a 40-point stop works, check that 35 and 45 also work |
| Look-ahead bias | Acting on a candle before it closes makes results look better than they were | Decide only on closed candles and move bar by bar |
| Ignoring costs | A thin edge disappears, as the example showed | Subtract brokerage, taxes, charges and slippage from every trade |
| Too few trades | A lucky week looks like an edge | Collect a larger sample across different market phases |
| Cherry-picking days | Skipping ugly days inflates results | Test every day the rules would have triggered |
| Changing rules mid-test | You are no longer testing one strategy | Freeze the rules, then record a new version separately |
Split your data, forward test on the part you never touched, then paper trade or use the smallest size for a few weeks. Increase size only if live results stay close to the test within a range you fixed in advance.
A simple split is to build the rules on the first 70% of your data and test them once on the last 30%. If they fail there, do not tweak until they pass. That is fitting again, not testing. Go back to the idea.
Mentor Suggestion: Keep a one-page log for every strategy with the rules, the test period, the key numbers and the date you froze it. Review it every weekend, and change one thing at a time. If you want to see how my students apply this on NIFTY, browse the Trading Direction blog.
Do not trade a backtested strategy when costs wipe out the edge, when the losing streak is larger than you can bear, or when the market no longer behaves like your test data. In these cases, the numbers are telling you to wait.
There is no official number. Guides suggest anything from 30 to several hundred. Pick a rule, such as 100 trades across different market phases, and apply it to every strategy you test.
Yes. Use a bar replay feature on your charting platform, click through candles one by one and log each trade in a spreadsheet. Manual testing also teaches chart logic.
No. A backtest uses past data only. Add a forward test on unseen data and then start with the smallest size. No outcome is assured at any stage.
Use enough to cover trending, sideways and volatile phases. There is no official length. Many traders start with two to three years for an intraday rule and then test more.
There is no official number. It depends on the Reward to Risk Ratio. In the example above, a 40% win rate with a 1:2 Reward to Risk Ratio was positive before costs but thin after costs.
Common reasons are costs, slippage, emotions, over-fitting and a change in market conditions. This is why forward testing and small starting size matter.
If you are new to reading charts, start with the Trading Direction Free Trading Course and build the basics at your own pace.
Join the Free Trading Course⭐⭐⭐⭐⭐
We’d Love Your Feedback!
Please take a minute to share your review and Submit Rating.
Search ‘Trading Direction’ on Google or Google Maps, then click Write a Review.
https://share.google/JCfFYqYVsAioCacP4
Thank you!
Disclaimer: This article is for education only and is not investment advice. All figures and examples are illustrative. Trading in derivatives carries a high risk of loss, including the whole premium, and no outcome is assured. Trading Direction and the author are not presented as a SEBI-registered investment adviser. Please verify all figures, charges and rules on official sources such as SEBI, NSE and your broker before you act.