Stop watching charts. Start trading systems.
Quick Start Β· Why DeltaForge Β· Features Β· Docs Β· π Live Dashboard Β· Disclaimer
DeltaForge has been archived. After 228 trades across 140 days of development and paper trading (JunβOct 2026), the project is being retired.
Metric Value Deployed Capital βΉ45,000 Final Capital βΉ145,025 Peak Capital βΉ177,670 Total Return +222% Total Trades 228 Win Rate 47% Period Jun 2, 2026 β Oct 19, 2026
- Signal generation β PULLBACK, TREND_RIDE, and STOCH_CROSS strategies consistently identified good entries
- Trailing stops β STEP_TRAIL and STRATEGY_TRAIL captured 2β3Γ more on winners than losses
- Risk management β direction caps, lot caps, and HARD_CAP prevented catastrophic single-day blowups
- Real-premium integration β system evolved to use actual option LTPs from the broker API instead of a formula model
- HARD_CAP exits destroyed βΉ189,450 of profit (63% of gross gains) β the #1 P&L killer across the entire run
- Engine reliability β silent crashes and
launchdnot restarting cost 15+ trading days with zero activity- Over-optimization β constant filter tuning (RSI gates, direction whitelists, ADX thresholds) often blocked more profitable trades than bad ones
- Paper β Real β the premium model diverged significantly from actual option market behavior; switching to real premiums late in the project revealed the gap
- Ship to live (even 1 lot) early β paper trading validates signals, not P&L
- Fewer filters, wider stops β let the strategy breathe
- Reliability > strategy β a system that doesn't run can't make money
- Real option pricing is non-negotiable from day one
The live dashboard remains available as a record of the full trading history.
β Moving on to the next thing.
DeltaForge is an autonomous intraday options trading system for Nifty 50 on the NSE. You define the rules β it watches the market, finds entries, manages risk, sizes positions, and gets out. Paper or live, same engine, same signals, no surprises.
Works with: Angel One SmartAPI Β· Slack Β· iMessage Β· Telegram
Disclaimer β This is educational software, not financial advice. Options trading involves substantial risk of loss. See DISCLAIMER.md.
Prerequisites: Python 3.9+, macOS or Linux, Angel One trading account
git clone https://github.com/mimran-khan/deltaforge.git
cd deltaforge
make install # venv + deps + registers `df` CLI
cp .env.example .env # add your Angel One creds
df selftest # verify everything worksStart paper trading:
$ df trade
[09:15:01] Engine started in PAPER mode
[09:15:02] WebSocket connected β streaming Nifty ticks
[09:22:15] SIGNAL Stochastic Cross BUY conf=72
[09:22:15] RISK 9/9 gates passed
[09:22:16] ENTRY NIFTY 24500 CE @ βΉ185.40 qty=50
[10:14:33] EXIT βΉ213.20 P&L +βΉ1,390 (+15.0%)
[15:30:00] EOD 3 trades | Net P&L +βΉ3,820 | Capital βΉ13,820Go live when you're ready:
df trade --live # requires confirmationMost retail options tools are either overpriced terminals you can't customize, or fragile scripts taped together with cron jobs. DeltaForge is neither.
| Manual / Spreadsheet | Paid Terminals | DeltaForge | |
|---|---|---|---|
| Execution | You click buttons all day | Alerts, you still click | Fully autonomous β entry to exit |
| Risk management | "I'll stop at 5% loss" (you won't) | Basic SL/target | 9-gate filter + independent kill switch |
| Position sizing | Fixed lots, guesswork | Basic calculators | Auto-compounds with equity, scales down on drawdown |
| Backtesting | Copy-paste into Excel | Separate tool, different logic | Same engine β backtest = paper = live |
| Alerts | Check the app | Email (if lucky) | Instant Slack, iMessage, or Telegram |
| Cost | Free (your time isn't) | βΉ2,000ββΉ15,000/mo | Free and open source |
| Feature | Description |
|---|---|
| π§ Multi-Strategy Engine | Trend Ride, Pullback-in-Trend, Supertrend Flip, Stochastic Cross β all run in parallel with regime-aware confidence scoring |
| π Multi-Asset Trading | Nifty 50 options (NSE) + MCX Crude Oil Mini + CDS USDINR futures β each with independent risk pools |
| π‘οΈ Adaptive Risk System | Daily loss limits (10%), consecutive-loss brakes, drawdown tiers, adaptive mode that adjusts confidence/lots in real-time |
| π΄ Kill Switch | Independent watchdog process. Halts trading on breach, manual override via CLI or dashboard. Works even if the main engine hangs. |
| π Compound Sizing | Scales lots with capital growth. Position sizing adapts to equity curve with configurable per-lot capital allocation. |
| π Live Dashboard | FastAPI + WebSocket β capital, trades, risk status, halt toggle. All at localhost:8900 |
| π¬ Instant Alerts | Slack (recommended), iMessage (macOS), or Telegram β entries, exits, errors, end-of-day P&L reports |
| π Paper β Live Parity | Identical code path across backtest, paper, and live. If it works in paper, it works in production. Zero divergence. |
| π Walk-Forward Backtest | 100+ day replays with production engine. Realistic costs (brokerage + STT + slippage). Compound lot sizing. |
| β° Automated Scheduling | macOS launchd agent for daily auto-start, code sync, health monitoring, and session management |
graph LR
A["π‘ Angel One WebSocket"] --> B["π― CandleBuilder"]
B --> C["π§ MultiStrategyEngine"]
C --> D{"π‘οΈ RiskEngine + AdaptiveMode"}
D -->|"β
pass"| E["π° PositionManager"]
D -->|"β reject"| F(("Skip"))
E --> G["π Dashboard"]
E --> H["π¬ Alerts"]
I["π΄ Kill Switch"] -.->|"halt"| D
J["π‘ Futures Feed"] --> K["π MultiAssetEngine"]
K --> D
# Trading
df trade # paper mode (default)
df trade --live # live (confirmation required)
df trade -v # verbose / debug output
# Monitoring
df status # capital, drawdown, risk state
df logs -f # follow today's log
df db stats # per-strategy performance
df db summary # today's trade summary
# Backtesting
df backtest --days 180 # default capital βΉ10,000
df backtest --days 365 --capital 50000
# Testing & Verification
df selftest # pre-flight engine check
df broker # test broker connection
df alert "test" # verify alert channel
# Dashboard
make dashboard # web UI at localhost:8900
make run # trading + dashboard togetherCopy .env.example and fill in your credentials:
# Angel One SmartAPI (required)
ANGEL_API_KEY=your_api_key
ANGEL_CLIENT_ID=your_client_id
ANGEL_PASSWORD=your_password
ANGEL_TOTP_SECRET=your_totp_secret
# Trading
TRADING_MODE=paper
STARTING_CAPITAL=10000
# Risk Management
DAILY_LOSS_LIMIT_PCT=10 # halt after 10% daily loss
CAPITAL_PER_LOT=3000 # lot sizing aggressiveness
# Alerts β choose: "slack", "imessage", or "telegram"
ALERT_METHOD=slack
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_CHANNEL_ID=C0XXXXXXXXXAll parameters live in config/settings.py and are overridable via .env. See .env.example for every configurable option.
| Paper | Live | |
|---|---|---|
| Signal generation | Identical engine | Identical engine |
| Order execution | Simulated (premium model) | Angel One SmartAPI |
| Costs | Realistic (brokerage + STT + slippage) | Actual |
| Risk gates | All 9 enforced | All 9 enforced |
Same code. Same signals. Same risk. If it works in paper, it works in live.
| Topic | Description |
|---|---|
| Strategies & Indicators | How each strategy generates signals, indicator reference, options model |
| Risk Model & Kill Switch | 9-gate system, drawdown tiers, real-time monitoring, kill switch |
| Dashboard & API | REST endpoints, WebSocket, security configuration, alerts |
| Architecture & Design | Data flow, system components, project structure, design decisions |
Auto-generated trading report with interactive equity curves, calendar heatmaps, trade analytics, and strategy breakdowns. Deployed via GitHub Pages β updated with each push.
| Timeline | Milestone |
|---|---|
| Shipped | Multi-strategy engine, adaptive risk system, multi-asset (Nifty + MCX + CDS), compound sizing, automated daily scheduling, walk-forward backtesting, Slack/iMessage/Telegram alerts, FastAPI dashboard |
| Next | BankNifty support, strategy marketplace, ML-based regime detection |
| Future | Mobile companion alerts, cloud sync, community strategies, broker-agnostic execution |
- Angel One SmartAPI β Broker connectivity & WebSocket market data
- FastAPI β Dashboard HTTP layer
- Loguru β Structured logging
- Pandas β Indicator computation & data analysis
- SQLite β Trade persistence
- WebSocket β Real-time market feed
We're building the trading system we wish existed β help us make it better.
Contribute: New strategies, risk improvements, broker integrations, indicators, bug fixes, docs
make test # full test suite
make test-e2e # end-to-end only
make test-component # component testsMIT β see LICENSE. Full trading disclaimer in DISCLAIMER.md.
Your strategy deserves better than a spreadsheet and a prayer.
β Star Β· π Share Β· π€ Contribute
