Paper Trading Complete Guide

The definitive guide to testing your strategy with production-grade paper trading before risking real capital. From enabling your first paper trade to confidently going live — every step, every setting, every metric explained.

Indian Markets Only NSE · BSE · NFO · MCX Zero Real Capital Risk Production-Grade Cost Model
1 — Why Paper Trade First?
🎯 What Paper Trading Gives You
  • Test your strategy with realistic Indian market costs (brokerage, STT, stamp duty, exchange fees, SEBI charges).
  • Find out if your edge survives friction before you risk money.
  • Build confidence through verified statistics: win rate, Sharpe ratio, expectancy, max drawdown.
  • Catch bugs in AFL signals, SL/TP logic, and position sizing before they cost real rupees.
  • Practice discipline: follow signals mechanically, review results daily.
⚠️ What Paper Trading Cannot Do
  • It cannot simulate real slippage from order book depth or market impact.
  • It does not replicate the emotional pressure of real money at risk.
  • It uses estimated costs, not actual broker confirmations.
  • Good paper results are necessary but not sufficient for live profitability.

The Rule: never go live until paper trading shows consistent edge over at least 50–100 trades across different market conditions. If your strategy cannot win on paper with realistic costs, it will not win with real money.

2 — First-Time Setup (Step by Step)
1
Enable Paper Trading Mode

In the main application, go to the Paper Trading tab. Toggle the Paper Trading switch to ON. This activates the paper engine without affecting any live broker connection.

2
Set Your Starting Balance

Go to Paper Trading → Settings. Set Initial Balance to the amount you plan to trade with in real life (e.g., ₹1,00,000 or ₹5,00,000). This makes results directly comparable to your real capital.

3
Configure Realistic Cost Model

Set these to match your broker's actual charges. Defaults are calibrated for Indian discount brokers (Zerodha / Shoonya / Angel One):

SettingDefaultWhat It Is
Commission Rate0.03%Brokerage per side (min ₹20 enforced)
STT Rate0.05%Securities Transaction Tax (sell side)
Exchange Fee Rate0.05%NSE/BSE transaction charge
SEBI Fee Rate0.01%SEBI regulatory charge
Stamp Duty Rate0.05%State stamp duty (buy side)
Slippage0.05%Estimated price execution variance
Spread0.02%Bid-ask spread estimate
4
Set Risk Parameters

These should match what you plan to use in live trading:

SettingDefaultRecommended Start
Risk Per Trade1.0%1–2% of your capital
Max Daily Loss₹5002–5% of your capital
Max Drawdown20%15–25% of starting balance
Max Positions103–10 concurrent
Max Trades/Day505–20 for intraday
Default SL%2.0%1–3% depending on style
Default TP%4.0%2–6% (match your R:R target)
5
Enable Trade Quality Gate

This is the viability engine that prevents cost-negative trades from entering. Turn it ON and use these production defaults:

SettingRecommendedPurpose
Trade Quality GateONEnable cost-aware trade filtering
Non-Viable ModeSTRICTBlock poor-edge trades
Weak Tier ActionREJECTBlock marginal trades too
Min Expected Profit₹100Absolute minimum gross edge
Adaptive Min EdgeONVolatility-aware filtering
Adaptive Multiplier0.5Dynamic edge scaling factor
Min Volatility Floor0.1%Prevents ultra-tight SL exploits
Min Samples30Trades needed before gate activates
6
Set Trading Hours

NSE equity: 09:15 → 15:30, square-off at 15:25. MCX: adjust to the commodity session. Signals outside these hours are ignored.

7
Connect Your AFL Strategy

Your AmiBroker AFL sends signals via HTTP to the gateway. The gateway dispatches to the paper trading engine. No broker API is needed — paper mode runs entirely locally on your machine.

You are now ready. Start AmiBroker, load your strategy, and let it run during market hours. Paper trades will appear in the Dashboard tab in real time.

3 — How A Paper Trade Flows (End to End)
AFL fires BUY/SELL signal → HTTP to Gateway
Gateway dispatches → execute_signal()
Source normalization + signal de-duplication (5s window)
Reversal detection: auto-close opposite position if needed
Risk checks: daily loss, max positions, drawdown limit
Cost-aware position sizing (binary search for optimal qty)
Viability scoring: per-share edge vs. per-share cost
Tier assigned: STRONG / ACCEPTABLE / WEAK / REJECT / REJECT_ABSOLUTE
Trade opens → balance deducted → saved to DB
Real-time monitoring: SL/TP checks on every price tick
Trade closes → full cost stack applied → PnL recorded
History manager updates stats: win rate, Sharpe, expectancy
4 — Understanding the Cost Model

This is what makes paper results trustworthy. The system applies the full Indian market cost stack on every trade — both entry and exit. This is not simplified or averaged. Each component is calculated separately.

Full Cost Calculation (Per Trade)
ENTRY SIDE:
  Brokerage   = max(notional × 0.03%, ₹20)     ← minimum ₹20 per order
  Stamp Duty  = buy_notional × 0.05%            ← charged on buy side only
  Slippage    = notional × 0.05%                ← estimated execution variance
  Spread      = notional × 0.02%                ← bid-ask cost

EXIT SIDE:
  Brokerage   = max(notional × 0.03%, ₹20)
  STT         = sell_notional × 0.05%           ← charged on sell side only
  Slippage    = notional × 0.05%
  Spread      = notional × 0.02%

BOTH SIDES:
  Exchange Fee = notional × 0.05%               ← per side
  SEBI Fee     = notional × 0.01%               ← per side

TOTAL COST = (all entry costs) + (all exit costs)
NET PNL    = Gross PnL − Total Cost
Example: Profitable Trade
BUY RELIANCE @ ₹2,450 × 10 shares
SELL @ ₹2,510 (target hit)

Gross P&L    = (2510 − 2450) × 10 = ₹600
Total Cost   ≈ ₹59.70
Net P&L      = ₹600 − ₹59.70 = +₹540.30

Cost as % of notional = 0.24%
Kept 90% of gross edge ✅
Example: Cost-Killed Trade
BUY YESBANK @ ₹18.50 × 50 shares
SELL @ ₹19.10 (target hit)

Gross P&L    = (19.10 − 18.50) × 50 = ₹30
Total Cost   ≈ ₹44.80
Net P&L      = ₹30 − ₹44.80 = −₹14.80

Trade "won" on price but LOST on costs ❌
Viability gate would have blocked this
5 — The Viability Engine (Your Edge Filter)
How Score Is Computed
per_share_profit = expected_move  (target − entry)
per_share_cost   = total_cost / quantity
viability_score  = per_share_profit / per_share_cost

Per-share scoring is quantity-independent. It measures the true quality of the trade setup — not how big the position is.

Adaptive Minimum Edge
volatility_unit = abs(entry − stop_loss)
    // floor: entry × min_volatility_floor_pct

dynamic_min = volatility_unit × multiplier × qty
static_min  = min_expected_profit (e.g., ₹100)
final_min   = max(static_min, dynamic_min)

Adjusts automatically: tighter minimum in quiet markets, higher bar in volatile markets.

TierScore RangeWhat It MeansDefault Action (STRICT)
STRONG≥ 2.0Expected profit covers costs 2× or moreAllow
ACCEPTABLE1.2 – 1.99Solid edge, worth takingAllow
WEAK0.8 – 1.19Marginal — barely beats costsReject (configurable to Warn)
REJECT< 0.8Expected profit cannot cover costsReject
REJECT_ABSOLUTEanyTotal gross edge below minimum (e.g., < ₹100)Hard reject always
6 — SL / TP / Trailing Stop — How Exits Work
Stop Loss
  • Set from AFL signal or auto-calculated if missing.
  • Default: entry ± 2% (configurable).
  • Checked on every real price tick via TradingEngine.
  • When hit: trade closes immediately at SL price.
Take Profit
  • Set from AFL signal target or auto-calculated.
  • Default: entry ± 4% (configurable).
  • Checked on every tick alongside SL.
  • When hit: trade closes at TP price.
Square-Off
  • At 15:25 (configurable), all open positions close.
  • Prevents overnight exposure in intraday strategies.
  • Uses last available market price.
  • Full cost stack applied on exit.

Unified SL/TP Engine: Paper and live trading share the exact same TradingEngine for SL/TP evaluation. This means your paper exits will behave identically to live exits.

7 — Reading Your Results (Dashboard)
Active Trades View

Every open trade shows in real time:

ColumnMeaning
Trade IDUnique identifier (e.g., PAPER_000042)
SymbolStock/instrument name (RELIANCE, NIFTY, CRUDEOIL, etc.)
SideBUY (long) or SELL (short)
QtyPosition quantity (may be adjusted by cost-aware sizing)
Entry PricePrice at which trade was opened
Current PriceLatest market price (updates on every tick)
PnLCurrent unrealized profit/loss (includes cost estimate)
SL / TPActive stop-loss and target levels
DurationHow long the trade has been open
8 — The Metrics That Matter
Win Rate

Winning trades ÷ total trades × 100. Aim for > 45% with proper R:R.

Expectancy

(WinRate × AvgWin) − (LossRate × AvgLoss). Must be positive.

Profit Factor

Total wins ÷ total losses. Aim for > 1.5.

Max Drawdown

Largest peak-to-trough decline. Keep under 15–25%.

Sharpe Ratio

Risk-adjusted return: mean return ÷ standard deviation. > 1.0 is good, > 2.0 is excellent for intraday.

Cost Efficiency

Total costs ÷ total gross PnL. Should be well below 30% — if costs eat more than 30% of your gross edge, the strategy is fragile.

The Golden Rule: No single metric tells the full story. A 70% win rate with ₹5 avg win and ₹50 avg loss is terrible. A 35% win rate with ₹100 avg win and ₹30 avg loss is excellent. Always check expectancy alongside win rate.

9 — Daily Review Checklist
End-of-Day Review (Do This Every Day)
  • Open Trade History tab. Review all closed trades for the day.
  • Check: did any trade hit SL because of stale price? (look for [STALE PRICE] in logs)
  • Check: were any trades rejected by viability gate? Were they correctly blocked?
  • Note your daily P&L, win rate, and max intraday drawdown.
  • Compare gross P&L vs. net P&L — how much did costs take?
  • Check cost efficiency — is it trending up (bad) or stable?
  • Look for any symbols where you consistently lose → consider removing them.
  • Export to CSV if needed for offline analysis.
  • Ask yourself: is this a strategy I would trust with real money?
10 — When To Go Live (Decision Framework)

DO NOT go live if any of these are true:

  • You have fewer than 50 closed paper trades.
  • Expectancy is negative or barely positive.
  • Max drawdown exceeded your planned risk tolerance.
  • Profit factor is below 1.2.
  • Cost efficiency is above 40% (costs eating your edge).
  • Win rate + R:R don't produce positive expectancy math.
  • You have not tested across both trending and sideways days.
MetricMinimum To Go LiveGood TargetExcellent
Total Trades50+100+200+
ExpectancyPositive> ₹50/trade> ₹150/trade
Win Rate> 35%> 45%> 55%
Profit Factor> 1.2> 1.8> 2.5
Sharpe Ratio> 0.5> 1.0> 2.0
Max Drawdown< 25%< 15%< 10%
Cost Efficiency< 40%< 25%< 15%
Consecutive Losses< 8< 5< 3
11 — Going Live: Transition Checklist
Before You Switch
  • Paper stats meet all minimum thresholds in Section 10.
  • You have tested for at least 2 weeks across different market days.
  • SL/TP levels are realistic and survive real market volatility.
  • Your broker API is connected and tested with a small manual order.
  • Money Management settings match what you used in paper trading.
  • Risk parameters (max loss, drawdown, position limits) are set.
  • You have a written plan: what to do if 3 consecutive losses happen.
First Week Live
  • Start with 50% of your planned capital. Scale up after 1 week.
  • Use half your planned position size. Build confidence first.
  • Keep paper trading running in parallel to compare results.
  • Monitor slippage: compare paper fills vs. real fills each day.
  • If real results diverge significantly from paper — stop and investigate.
  • Do not increase size until you have 20+ live trades matching paper performance.
  • Review logs for order rejections, timeouts, or connection failures.
12 — Indian Market Presets
NSE Cash Intraday
  • Min Expected Profit = ₹100 – ₹250
  • Adaptive Multiplier = 0.5
  • Min Volatility Floor = 0.10%
  • Default SL = 1.5–2%
  • Default TP = 3–4%
  • Best for: SBIN, RELIANCE, INFY, TCS, HDFCBANK
Lowest cost environment
NFO Options / Futures
  • Min Expected Profit = ₹250 – ₹750
  • Adaptive Multiplier = 0.7
  • Min Volatility Floor = 0.15–0.25%
  • Default SL = 2–3%
  • Default TP = 4–8%
  • Best for: NIFTY, BANKNIFTY, stock F&O
Higher cost, need more edge
MCX Commodities
  • Min Expected Profit = ₹300 – ₹1000
  • Adaptive Multiplier = 0.75
  • Min Volatility Floor = 0.15–0.30%
  • Default SL = 1–2%
  • Default TP = 2–5%
  • Best for: GOLD, SILVER, CRUDEOIL, NATURALGAS
Volatile — needs wider stops
13 — Common Mistakes & How To Avoid Them
❌ Mistakes That Kill Profitability
  • Setting costs to zero — makes paper results unrealistic.
  • Going live after 10 trades — insufficient data to trust.
  • Ignoring drawdown — great win rate means nothing if one bad streak wipes capital.
  • Turning off quality gate — allows cost-negative trades through.
  • Changing strategy mid-test — invalidates all accumulated stats.
  • Only testing in one market condition — bull-market paper stats collapse in range/bear.
  • Comparing gross P&L to live net P&L — use net-after-cost figures only.
✅ Habits That Build Edge
  • Review rejected trades — check if the gate was right. Iterate.
  • Track cost efficiency weekly — catch drift early.
  • Export CSV monthly — do offline analysis with real charting tools.
  • Paper trade for a full month across different Nifty regimes.
  • Journal your observations — patterns you notice are more valuable than metrics.
  • Test with realistic capital — ₹1 lakh paper with ₹10 lakh live gives misleading sizing.
  • Keep manual override OFF in production — test it separately.
14 — Understanding Logs (Debug Cheat Sheet)
Key Log Patterns
Log PatternWhat It MeansAction
Trade opened: RELIANCE BUY Trade passed all gates and is now active. Normal operation.
❌ Rejected: Viability tier=REJECT Per-share cost efficiency too weak. Check if symbol is viable or increase qty.
❌ Rejected: tier=REJECT_ABSOLUTE Total expected profit below minimum edge. Normal for tiny moves. Strategy may need wider targets.
[STALE PRICE] RELIANCE → 2.83s old Price feed was momentarily delayed. Occasional = normal. Frequent = check connection.
Trade closed: net PnL = −₹85 Trade hit SL or was squared off at loss. Review if SL was too tight or entry was poor.
Paper trade quantity uplift Qty was increased to overcome fixed minimum costs. Normal for low-priced stocks. Watch capital usage.
Weak viability allowed (STRICT + weak_action=WARN) Marginal trade allowed because Weak Tier = WARN. Track these. Switch to REJECT if too many lose.
min_volatility_floor_pct=0.0010 Volatility floor is being applied. Check if your SL is unrealistically tight.
15 — Complete Settings Reference
SettingDefaultRangeWhere
Initial Balance₹1,00,000₹10,000 – ₹10,00,00,000Settings tab
Risk Per Trade1.0%0.1% – 10%Settings tab
Max Trades/Day501 – 500Settings tab
Max Positions101 – 100Settings tab
Max Daily Loss₹500₹100 – ₹10,00,000Settings tab
Max Drawdown20%5% – 50%Settings tab
Default SL%2.0%0.1% – 20%Settings tab
Default TP%4.0%0.1% – 50%Settings tab
Risk:Reward Ratio2.00.5 – 10.0Settings tab
Commission Rate0.03%0.00% – 1.00%Settings tab
STT Rate0.05%0.00% – 1.00%Settings tab
Exchange Fee0.05%0.00% – 1.00%Settings tab
SEBI Fee0.01%0.00% – 1.00%Settings tab
Stamp Duty0.05%0.00% – 1.00%Settings tab
Slippage0.05%0.00% – 2.00%Settings tab
Spread0.02%0.00% – 2.00%Settings tab
Trade Quality GateONON / OFFSettings tab
Non-Viable ModeSTRICTSTRICT / WARN / OFFSettings tab
Weak Tier ActionREJECTREJECT / WARNSettings tab
Min Expected Profit₹100₹0 – ₹10,00,000Settings tab
Adaptive Min EdgeONON / OFFSettings tab
Adaptive Multiplier0.50.0 – 10.0Settings tab
Min Volatility Floor0.10%0.01% – 2.00%Settings tab
Manual OverrideOFFON / OFFSettings tab
Min Gate Samples305 – 1000Settings tab
Score Threshold55.00 – 100Settings tab
Trading Start09:15Settings tab
Trading End15:30Settings tab
Square Off Time15:25Settings tab
16 — The Winning Mindset
📈 Think Like a Business
  • Paper trading is your R&D phase. You are testing a product (your strategy) before launch.
  • Every rejected trade is a saved loss. Every allowed trade is a bet that should have positive expectancy.
  • Your goal is not 100% wins. Your goal is positive expectancy maintained over hundreds of trades.
  • The market does not care about your feelings. It cares about math: win% × avg win > loss% × avg loss.
🧠 Process Over Outcome
  • A losing trade executed correctly is better than a winning trade executed recklessly.
  • If your expectancy is positive, losses are just the cost of doing business.
  • Track your discipline score: what % of signals did you follow mechanically vs. overrode?
  • After 100 paper trades: if the math works, trust the math. Go live with conviction.

The Final Test: Open your paper trading history. Look at the worst 5 consecutive losing trades. If you can handle that same streak with real money and still follow your system — you are ready.

17 — Quick Start Summary (One Page)
Setup (5 minutes)
  1. Enable Paper Trading toggle
  2. Set balance = your planned real capital
  3. Keep cost model at defaults (Indian broker rates)
  4. Set risk: 1-2% per trade, 20% max drawdown
  5. Enable Trade Quality Gate = STRICT
  6. Set trading hours: 09:15 – 15:30
  7. Connect AmiBroker and run your strategy
Review (daily, 5 minutes)
  1. Check daily net P&L (not just gross)
  2. Note win rate + expectancy
  3. Review any rejected trades in logs
  4. Track max drawdown trend
  5. Export CSV weekly for deeper analysis
Evaluate (after 2-4 weeks)
  1. Check: 50+ trades completed?
  2. Expectancy positive?
  3. Profit factor > 1.2?
  4. Max drawdown within tolerance?
  5. Tested in both trending AND sideways days?
Go Live (confidently)
  1. Start with 50% capital, half position size
  2. Keep paper running in parallel
  3. Compare fills daily: paper vs. real
  4. Scale up after 20+ matching live trades
  5. Stop if real performance diverges > 30%