Algorithmic trading lab
Test a long-only moving-average crossover on your own OHLC CSV or synthetic example data. No AI, API or broker connection.
Backtest settings
Signals use completed closes; orders execute at the next bar open with adverse slippage. One unit, no leverage, no compounding. Open positions liquidated at final close for reporting.
Multi-strategy comparison
Compare four predefined long-only rules on the same data. SMA and EMA use crossovers; breakout uses prior slow-period highs and fast-period lows; RSI uses simple rolling gains and losses (not Wilder smoothing), with 30/70 thresholds. All signals execute next open. This is exploratory, not out-of-sample validation.
| Rule | Trades | Net ₹ | Drawdown | Win rate | Profit factor |
|---|
Drawdown uses closing equity, not intrabar extremes. No shorting, liquidity model, corporate action adjustments, taxes or margin. Profit factor is undefined without trades and infinite when there are gains but no losing trades.
Learn and reproduce
Algorithmic trading course · Python example · Pine Script indicatorUse out-of-sample data, verify fees and execution assumptions, and avoid optimizing on the same data used to evaluate results. No future performance is implied.
