� Trading Simulator - User Guide
🎮 Trading Simulator - User Guide
Version: 1.0
Last Updated: 10 Dec 2025
Audience: All Flytradr users
Difficulty: Intermediate
📋 Table of Contents
- Overview
- Quick Start
- Interface Overview
- Strategy Selection
- Market Selection
- Test Settings
- Speed Control
- Execution Realism
- Scenario Injection
- Running a Simulation
- Live Monitoring
- Playback Controls
- Results Analysis
- Templates
- Tips & Best Practices
- FAQ
- Related Guides
1. Overview
🎯 What is the Trading Simulator?
The Trading Simulator is a real-time strategy testing environment that replays historical market data while simulating realistic trading conditions. Unlike backtesting which processes data instantly, the simulator streams data at controllable speeds with live execution modeling.
Screenshot: [Diagram placeholder #1 - Add relevant screenshot here]
✨ Key Features
| Feature | Description |
|---|---|
| ⏱️ Speed Control | 6 speed modes from realtime (1x) to fast (2x) |
| 📡 Live Telemetry | Real-time streaming of ticks, trades, and metrics |
| 🎲 Execution Realism | Latency, market impact, partial fills, slippage |
| 💥 Scenario Injection | Test against flash crashes, volatility spikes |
| ⏸️ Pause/Resume | Full playback control during simulation |
| 📊 Live Metrics | Portfolio stats updated in real-time |
| 💾 Templates | Save and reload test configurations |
🔄 Simulator vs Backtesting vs Paper Trading
| Feature | Backtesting | Simulator | Paper Trading |
|---|---|---|---|
| Data Source | Historical | Historical | Live Market |
| Execution | Instant | Real-time replay | Real-time |
| Realism | Basic | Configurable | Full |
| Scenarios | ❌ | ✅ | ❌ |
| Duration | Seconds | Minutes-Hours | Ongoing |
| Use Case | Rapid iteration | Stress testing | Pre-live validation |
2. Quick Start
🚀 5-Step Launch Guide
Screenshot: [Diagram placeholder #2 - Add relevant screenshot here]
- Navigate: 🏠 Dashboard → 📊 Platform → 🎮 Simulator
- Select Strategy: Choose from library or Strategy Builder
- Choose Market: Pick provider, symbol, timeframe
- Configure Settings: Capital, fees, date range, speed mode
- Click Start: Watch live execution in real-time!
📸 [Screenshot placeholder: Simulator main interface with panels labeled]
3. Interface Overview
🖼️ Four-Panel Layout
Screenshot: [Diagram placeholder #3 - Add relevant screenshot here]
🎛️ Sidebar Controls
| Section | Purpose |
|---|---|
| Strategy | Load strategy from library or Strategy Builder |
| Market | Select data provider, symbol, interval |
| Test Settings | Configure capital, commission, slippage, dates |
| Execution Realism | Model latency, market impact, partial fills |
| Scenario Injection | Add stress test events |
| Speed Mode | Control replay speed |
| Estimates | Preview candle count, duration before running |
| Actions | Start, pause, stop, save, export |
| Templates | Save/load configurations |
📊 Main Content Panels
| Panel | Content |
|---|---|
| Progress Bar | Simulation progress with estimated time remaining |
| Status Banner | Current state (idle, running, paused, completed) |
| Portfolio Stats | Live equity, P&L, positions, cash |
| Live Execution | Open positions, pending orders, recent fills |
| Telemetry Timeline | Real-time event stream (ticks, trades, scenarios) |
| Runtime Health | Tick counter, execution latency, memory usage |
| Equity Curve | Live-updating performance chart |
| Trade List | All executed trades with details |
4. Strategy Selection
📋 Loading Your Strategy
Click the Strategy section in the sidebar to select a strategy:
Screenshot: [Diagram placeholder #4 - Add relevant screenshot here]
✅ Strategy Requirements
Your strategy must include:
| Requirement | Description |
|---|---|
| Entry Rules | At least one condition for entering trades |
| Exit Rules | At least one condition for exiting trades |
| Valid DSL | Strategy must compile without errors |
💡 Tip: If your strategy shows ⚠️ validation errors, return to Strategy Builder to fix them first.
5. Market Selection
📈 Choosing Your Market
Screenshot: [Diagram placeholder #5 - Add relevant screenshot here]
🌐 Available Providers
| Provider | Markets | Data Quality |
|---|---|---|
| TwelveData | US/Global Equities, Forex, Crypto | High |
| Flytradr Sample | Demo data for testing | Medium |
⏱️ Available Timeframes
| Timeframe | Code | Best For |
|---|---|---|
| 1 Minute | 1m | Scalping, high-frequency |
| 5 Minutes | 5m | Day trading |
| 15 Minutes | 15m | Intraday swing |
| 30 Minutes | 30m | Short-term swing |
| 1 Hour | 1h | Swing trading |
| 4 Hours | 4h | Position trading |
| Daily | 1d | Long-term strategies |
| Weekly | 1w | Investment strategies |
6. Test Settings
⚙️ Core Configuration
The Test Settings panel configures your simulation parameters:
┌────────────────────────────────────────────────────┐
│ ⚙️ Test Settings [▼] │
├────────────────────────────────────────────────────┤
│ │
│ Initial Capital │
│ ┌────────────────────┐ ┌────────────────────┐ │
│ │ ₹1,00,000 │ │ INR ▼ │ │
│ └────────────────────┘ └────────────────────┘ │
│ │
│ Commission (per trade) │
│ ┌────────────────────────────────────────────┐ │
│ │ ₹20 │ │
│ └────────────────────────────────────────────┘ │
│ │
│ Slippage │
│ ┌────────────────────────────────────────────┐ │
│ │ 0.05% │ │
│ └────────────────────────────────────────────┘ │
│ │
│ Date Range │
│ ┌───────────────────┐ ┌─────────────────────┐ │
│ │ 2024-01-01 │→│ 2024-06-30 │ │
│ └───────────────────┘ └─────────────────────┘ │
│ │
│ Quick Select: [1W] [1M] [3M] [6M] [1Y] │
│ │
│ Session Template │
│ ┌──────────────────────────────────────────────┐ │
│ │ Indian Equities (9:15-15:30 IST) ▼ │ │
│ └──────────────────────────────────────────────┘ │
│ │
└────────────────────────────────────────────────────┘
💰 Initial Capital Options
| Currency | Symbol | Typical Starting Capital |
|---|---|---|
| Indian Rupee | INR (₹) | ₹1,00,000 - ₹10,00,000 |
| US Dollar | USD ($) | $10,000 - $100,000 |
| Euro | EUR (€) | €10,000 - €100,000 |
| British Pound | GBP (£) | £10,000 - £100,000 |
| Japanese Yen | JPY (¥) | ¥1,000,000 - ¥10,000,000 |
| Australian Dollar | AUD | A$10,000 - A$100,000 |
| Canadian Dollar | CAD | C$10,000 - C$100,000 |
| Swiss Franc | CHF | CHF 10,000 - CHF 100,000 |
📅 Date Range Quick Selects
| Preset | Period | Candles (5m) | Use Case |
|---|---|---|---|
| 1W | 1 Week | ~1,560 | Quick validation |
| 1M | 1 Month | ~6,240 | Standard test |
| 3M | 3 Months | ~18,720 | Extended validation |
| 6M | 6 Months | ~37,440 | Comprehensive test |
| 1Y | 1 Year | ~74,880 | Full cycle analysis |
⏰ Session Templates
| Template | Hours (Local) | Timezone | Markets |
|---|---|---|---|
| Indian Equities | 9:15 - 15:30 | IST (Asia/Kolkata) | NSE, BSE |
| US Equities | 9:30 - 16:00 | EST (America/New_York) | NYSE, NASDAQ |
| EU Equities | 8:00 - 16:30 | CET (Europe/Paris) | LSE, Euronext |
| Global Forex | 24 hours | Rolling | All FX pairs |
| Crypto 24x7 | 24 hours | UTC | All crypto |
| Commodities | Various | Exchange-specific | COMEX, MCX |
7. Speed Control
⏱️ Replay Speed Modes
The simulator offers 6 speed modes to control how fast data is replayed:
Screenshot: [Diagram placeholder #6 - Add relevant screenshot here]
📊 Speed Mode Comparison
| Mode | Speed | Description | Best For |
|---|---|---|---|
| 🕐 Realtime | 1x | Matches actual market pace | Observing every tick |
| 🐢 Slow | 5x | 5x faster than realtime | Detailed analysis |
| 🎯 Auto | Dynamic | System selects optimal speed | Most users (recommended) |
| ⚡ Fast | 2x | Double processing speed | Quick validation |
| ⚖️ Balanced | Standard | Standard optimized speed | General testing |
| 🎬 Accurate | 0.5x | Half speed, smooth UI | Visual presentation |
📊 Pre-Simulation Estimates
Before starting, the simulator shows estimates:
Screenshot: [Diagram placeholder #7 - Add relevant screenshot here]
| Metric | Description |
|---|---|
| Candles | Total data points to process |
| Speed | Ticks per second (tps) |
| Duration | Estimated simulation time |
| UI Updates | How often the display refreshes |
8. Execution Realism
🎲 Modeling Real-World Execution
The Execution Realism panel lets you simulate real trading conditions:
Screenshot: [Diagram placeholder #8 - Add relevant screenshot here]
⚡ Network Latency & Jitter
Models network delays between your order and execution:
| Setting | Range | Description |
|---|---|---|
| Min Latency | 0-1000ms | Minimum delay before order executes |
| Max Latency | 0-5000ms | Maximum delay (orders vary randomly) |
| Jitter | On/Off | Random variability in latency |
💡 Tip: Retail brokers typically have 50-200ms latency. Institutional: 1-10ms.
📊 Order Book & Liquidity
Models realistic market depth:
| Setting | Description |
|---|---|
| Min Liquidity Threshold | % of daily volume - larger orders may be rejected |
| Partial Fills | Orders may fill partially if liquidity is thin |
| Min Fill Percentage | Minimum % of order that must fill (e.g., 50%) |
📈 Market Impact
Large orders move prices:
| Model | Description |
|---|---|
| Linear | Impact proportional to order size |
| Square Root | Realistic model - impact = √(size) × coefficient |
| None | No market impact (unrealistic) |
Impact Coefficient: Basis points of price impact per 1% of daily volume traded.
- Liquid stocks: 5-15 bps
- Illiquid stocks: 50-100 bps
📉 Dynamic Slippage
Slippage increases during volatile periods:
| Setting | Description |
|---|---|
| Volatility Multiplier | Base slippage × current volatility × this value |
Example: If base slippage is 0.05% and volatility is 2x normal with multiplier 1.5:
- Actual slippage = 0.05% × 2 × 1.5 = 0.15%
9. Scenario Injection
💥 Stress Testing Your Strategy
The Scenario Injection panel lets you inject synthetic market events:
┌────────────────────────────────────────────────────┐
│ 💥 Scenario Injection [▼] │
├────────────────────────────────────────────────────┤
│ │
│ ☑️ Enable Scenario Injection │
│ Stress test with synthetic market events │
│ │
│ Add Scenario: │
│ ┌────────────────────┬─────────────────────┐ │
│ │ 💥 Volatility Spike│ 📉 Flash Crash │ │
│ ├────────────────────┼─────────────────────┤ │
│ │ 💧 Liquidity │ 📰 News Shock │ │
│ │ Drought │ │ │
│ ├────────────────────┴─────────────────────┤ │
│ │ 🔄 Regime Shift │ │
│ └──────────────────────────────────────────┘ │
│ │
│ Active Scenarios (2): │
│ │
│ ┌──────────────────────────────────────────────┐ │
│ │ 📉 Flash Crash [Remove] │ │
│ │ Trigger: 11:30 | Drop: 5% | Recovery: 15min │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────┐ │
│ │ 💥 Volatility Spike [Remove] │ │
│ │ Start: 14:00 | Duration: 30min | 3x normal │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ ⚠️ Simulator Only: Scenarios are synthetic │
│ events for stress testing. │
│ │
└────────────────────────────────────────────────────┘
🎭 Available Scenario Types
| Scenario | Icon | Description |
|---|---|---|
| Volatility Spike | 💥 | Sudden VIX-style volatility explosion |
| Flash Crash | 📉 | 2010-style rapid price drop and recovery |
| Liquidity Drought | 💧 | Spreads widen, order book depth vanishes |
| News Shock | 📰 | Gap up/down on unexpected news |
| Regime Shift | 🔄 | Gradual transition from low to high volatility |
💥 Volatility Spike Settings
| Setting | Description | Example |
|---|---|---|
| Start Time | When spike begins (HH:MM) | 10:00 |
| Duration | How long it lasts (minutes) | 30 |
| Multiplier | How much higher than normal | 3x |
📉 Flash Crash Settings
| Setting | Description | Example |
|---|---|---|
| Trigger Time | When crash begins | 11:30 |
| Drop Percentage | How far price drops | 5% |
| Recovery Time | Minutes to recover | 15 |
💧 Liquidity Drought Settings
| Setting | Description | Example |
|---|---|---|
| Start Time | When drought begins | 14:00 |
| Duration | How long it lasts | 60 min |
| Spread Multiplier | How much spreads widen | 3x |
📰 News Shock Settings
| Setting | Description | Example |
|---|---|---|
| Trigger Time | When news hits | 09:30 |
| Price Jump | Gap size (%) | 2% |
| Direction | Gap Up or Gap Down | Up |
🔄 Regime Shift Settings
| Setting | Description | Example |
|---|---|---|
| Start Time | When shift begins | 10:00 |
| From Volatility | Starting regime | Low |
| To Volatility | Ending regime | High |
| Transition Duration | Time to shift (minutes) | 120 |
10. Running a Simulation
▶️ Starting the Simulation
- Verify all settings are configured
- Check the Estimates panel for expected duration
- Click the green ▶️ Start button
📸 [Screenshot placeholder: Start button and pre-simulation estimate panel]
📊 Simulation Status Flow
┌──────────────────────────────────────────────────────────────┐
│ │
│ ⬤ Idle ──▶ ⬤ Initializing ──▶ ⬤ Running │
│ │ │
│ ▼ │
│ ⬤ Paused │
│ │ │
│ ▼ │
│ ⬤ Completed │
│ │
│ (or) ⬤ Failed (on error) │
│ │
└──────────────────────────────────────────────────────────────┘
🔄 Status Indicators
| Status | Color | Description |
|---|---|---|
| ⬤ Idle | Gray | Ready to start |
| ⬤ Initializing | Blue | Connecting to server |
| ⬤ Running | Green | Actively processing data |
| ⬤ Paused | Yellow | Temporarily stopped |
| ⬤ Completed | Green | Finished successfully |
| ⬤ Failed | Red | Error occurred |
⏱️ Progress Bar
┌────────────────────────────────────────────────────────────┐
│ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░ 45% │
│ Processed: 8,424 / 18,720 candles | ETA: 4m 15s │
└────────────────────────────────────────────────────────────┘
11. Live Monitoring
📡 Real-Time Telemetry
The simulator streams live data via SSE (Server-Sent Events):
┌────────────────────────────────────────────────────────────┐
│ 📡 Telemetry Timeline │
├────────────────────────────────────────────────────────────┤
│ │
│ 14:32:15.234 📈 TICK AAPL @ $185.42 (+0.12%) │
│ 14:32:15.456 🟢 BUY 100 shares @ $185.42 │
│ 14:32:18.789 📈 TICK AAPL @ $185.55 (+0.07%) │
│ 14:32:22.123 📈 TICK AAPL @ $185.61 (+0.03%) │
│ 14:32:25.456 💥 SCENARIO Volatility Spike Started! │
│ 14:32:30.789 📈 TICK AAPL @ $186.15 (+0.29%) │
│ 14:32:35.012 🔴 SELL 100 shares @ $186.15 [+$73] │
│ │
│ ⬇️ Auto-scrolling enabled │
│ │
└────────────────────────────────────────────────────────────┘
📊 Live Portfolio Stats
┌────────────────────────────────────────────────────────────┐
│ 💰 Portfolio Stats (Live) │
├──────────────┬──────────────┬──────────────┬──────────────┤
│ Equity │ Cash │ Open P&L │ Total P&L │
│ ₹1,03,542 │ ₹45,230 │ +₹1,280 │ +₹3,542 │
│ +3.5% │ │ │ +3.5% │
├──────────────┼──────────────┼──────────────┼──────────────┤
│ Positions │ Orders │ Trades │ Win Rate │
│ 2 │ 1 │ 15 │ 60% │
└──────────────┴──────────────┴──────────────┴──────────────┘
🖥️ Runtime Health
┌────────────────────────────────────────────────────────────┐
│ 🖥️ Runtime Health │
├──────────────┬──────────────┬──────────────┬──────────────┤
│ Tick Counter │ Exec Latency │ Memory Usage │ SSE Status │
│ 8,424/18k │ 45ms avg │ 128 MB │ 🟢 Connected │
└──────────────┴──────────────┴──────────────┴──────────────┘
12. Playback Controls
⏯️ Controlling the Simulation
| Button | Action | Keyboard |
|---|---|---|
| ▶️ Start | Begin simulation | — |
| ⏸️ Pause | Temporarily stop | — |
| ▶️ Resume | Continue from pause | — |
| ⏹️ Stop | End simulation | — |
⏸️ When to Use Pause
- Observe a specific event: Pause to analyze what just happened
- Scenario triggered: Watch how strategy responds
- Large trade executed: Review order details
- Take a break: Return later without losing progress
💡 Tip: Pausing does NOT reset the simulation. You can resume from exactly where you left off.
13. Results Analysis
📊 Performance Summary
After completion, the simulator shows comprehensive results:
┌────────────────────────────────────────────────────────────┐
│ 📊 Performance Summary │
├────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Return: +12.5% │ Max Drawdown: -8.2% │ │
│ │ Sharpe: 1.45 │ Sortino: 1.82 │ │
│ │ Win Rate: 58% │ Profit Factor: 1.65 │ │
│ │ Total Trades: 45 │ Avg Trade: +₹312 │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└────────────────────────────────────────────────────────────┘
📈 Available Charts
| Chart | Shows |
|---|---|
| Equity Curve | Portfolio value over time |
| Drawdown Chart | Peak-to-trough losses |
| Win/Loss Distribution | Trade outcome histogram |
| Monthly Returns | Calendar heatmap of returns |
📋 Trade List
┌────────────────────────────────────────────────────────────────────────┐
│ 📋 Trade List [Export CSV] │
├────────┬────────┬─────────┬─────────┬─────────┬───────────┬───────────┤
│ # │ Time │ Side │ Symbol │ Qty │ Price │ P&L │
├───┼────────────┼─────────┼─────────┼─────────┼───────────┼───────────┤
│ 1 │ 09:32:15 │ 🟢 BUY │ AAPL │ 100 │ $185.42 │ — │
│ 2 │ 10:15:30 │ 🔴 SELL │ AAPL │ 100 │ $186.15 │ +$73 │
│ 3 │ 11:02:45 │ 🟢 BUY │ AAPL │ 150 │ $184.90 │ — │
│ 4 │ 12:45:20 │ 🔴 SELL │ AAPL │ 150 │ $183.50 │ -$210 │
│ 5 │ 14:10:55 │ 🟢 BUY │ AAPL │ 100 │ $185.00 │ — │
└───┴────────────┴─────────┴─────────┴─────────┴───────────┴───────────┘
💾 Exporting Results
Click Export to download:
| Format | Contents |
|---|---|
| CSV | All trades, metrics, timestamps |
| JSON | Full simulation data including configuration |
14. Templates
💾 Saving Configuration Templates
Save your simulation setup for reuse:
┌────────────────────────────────────────────────────────────┐
│ 💾 Templates │
├────────────────────────────────────────────────────────────┤
│ │
│ [Save Current Config] │
│ │
│ Saved Templates: │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 📁 "AAPL Stress Test" [Load] [Delete] │ │
│ │ AAPL 5m | $100k | Flash Crash enabled │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ 📁 "Quick Validation" [Load] [Delete] │ │
│ │ Any symbol | 1 week | Fast mode │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ 📁 "Full Realism Test" [Load] [Delete] │ │
│ │ All realism options | Slow mode │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└────────────────────────────────────────────────────────────┘
📝 What Templates Include
| Component | Saved |
|---|---|
| Strategy Reference | ✅ |
| Market Selection | ✅ |
| Test Settings | ✅ |
| Execution Realism | ✅ |
| Scenario Injection | ✅ |
| Speed Mode | ✅ |
15. Tips & Best Practices
💡 Pro Tips
-
Start with Auto Speed
- Let the system optimize for your data volume
- Switch to specific modes only if needed
-
Use Conservative Realism
- Enable at least latency and slippage
- Better to overestimate friction than underestimate
-
Test Edge Cases with Scenarios
- Every strategy should survive a flash crash
- Test regime shifts before going live
-
Compare with Backtesting
- Run same config in backtesting first
- Simulator results should be similar (slightly worse)
-
Save Templates for Repeated Tests
- Create standard test templates
- Maintain consistency across strategy versions
⚠️ Common Mistakes to Avoid
| Mistake | Problem | Solution |
|---|---|---|
| Zero slippage | Unrealistic fills | Always set 0.01-0.1% |
| No latency | Instant execution | Enable 50-200ms delay |
| Fast mode only | Miss execution issues | Test with slower modes too |
| No scenarios | False confidence | Add at least one stress test |
| Too short date range | Statistical noise | Use minimum 1-3 months |
🎯 When to Use Simulator vs Others
| Use Case | Tool | Why |
|---|---|---|
| Rapid iteration | Backtesting | Fastest results |
| Execution testing | Simulator | Realistic fills |
| Stress testing | Simulator | Scenario injection |
| Pre-live validation | Paper Trading | Real market data |
| Parameter optimization | Backtesting | Many runs needed |
16. FAQ
❓ Frequently Asked Questions
Q: How long does a simulation take? A: Depends on data volume and speed mode. Check the Estimates panel before starting. A 3-month period at Auto speed typically takes 5-15 minutes.
Q: Can I change speed during simulation? A: Not currently. Stop the simulation and restart with different speed to change.
Q: Why are my results different from backtesting? A: Execution realism (latency, slippage, market impact) affects fills. The simulator is intentionally more conservative.
Q: What happens if I close the browser? A: The simulation continues on the server. Reconnect to see results, but you may miss some telemetry events.
Q: How many scenarios can I add? A: No hard limit, but too many overlapping scenarios may produce unrealistic conditions.
Q: Does scenario injection affect historical data? A: Scenarios are overlaid on top of historical data. The original data is not modified.
Q: Why is the SSE connection showing error? A: Network issues or server restart. The page will attempt to reconnect automatically. Refresh if it persists.
Q: Can I run multiple simulations simultaneously? A: Currently limited to one simulation per user session.
17. Related Guides
📚 Continue Learning
| Guide | Description |
|---|---|
| 📋 Strategy Builder Guide | Create and configure strategies |
| 🧪 Backtesting Lab Guide | Quick historical validation |
| 📄 Paper Trader Guide | Pre-live testing with real data |
| 📊 Dashboard Guide | Platform navigation |
🔧 Developer Documentation
- Trading Simulator Developer SOP - Technical implementation details
🆘 Need Help?
- 📧 Email: support@flytradr.com
- 💬 Chat: In-app support widget
- 📖 Docs: Full documentation at docs.flytradr.com
Last updated: December 10, 2025
Version: 1.0