๐ง Option Chain Clustering
Market regime detection + outcome prediction for fast trade decisions.
Intraday index price forecast
Index = the Underlying dropdown above (NIFTY / BANKNIFTY / SENSEX).
Broker = first broker in /api/brokers.
Minute chart of actual index LTP vs forecasted price bands for 30m / 1h / 2h (or EOD).
Actual index price (minute) plus forecasted price band (p10โp90) and median. Predicted lead shifts the forecast series to the target time.
| Time (IST) | Cluster | Conf% | LTP | Pred p50 | Band | Actual |
|---|---|---|---|---|---|---|
| Load runtime series to view rows. | ||||||
๐ Execution View
Pick a date (IST) to list executions for that day, click Show on a row to load graphs, or use the last-10 dropdown / search by execution ID.
Executions for selected day
| ID | Strategy | Status | Broker | Index | P&L | P&L % | Show |
|---|
Choose a date above (calendar day = IST on server). Past days list only closed/sold exits (target, SL, manual sell, etc.); cancelled/error rows are omitted. Today includes open positions too. Click Show to update the charts.
P&L (โน) vs Time
P&L % vs Time
Tick Data (last 20, newest first)
| Time | P&L | P&L % |
|---|
๐ Execution Metrics
Strategy-level execution behavior metrics with coverage-based selection and peak/draw metrics.
Common Reached Thresholds
Average Time to Peak (minutes)
Strategy Segments
| Strategy | Execs | Common Up % | Common Down % | Avg Active (min) | Avg Drawdown % | Avg Drawup % |
|---|
Executions Extended
Super admin only. Shows your executions only. Uses second-level timeline points from entry through end of 15:15 IST. Post-exit points are hypothetical from real option-chain data.
Strategy Metrics (Expiry vs Non-expiry)
| Strategy | Execs | Common Up % | Common Down % | Avg Active (min) | Avg Drawdown % | Avg Drawup % |
|---|
Premium change vs entry (โน)
% from entry
Executions
| ID | Strategy | Index | Strike | Entry (IST) | Exit (IST) | Max up % | Max down % | Snap pts | Show |
|---|
โ๏ธ Chained Strategy Monitor
Live health and execution status for mapped strategy chains (A โ B โ C ...).
| Chain | Level | Strategy | Strategy ID | Mode | Status | Index | Option Type | Buy Value | Sell Value | Profit | P/L % | Entry Time | Exit Time |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No data loaded yet. | |||||||||||||
๐ Trading Journal
Manually record broker trades and review P&L, slippage, and patterns. Derived values (amount used, P&L, result, slippage) are calculated on the server. You can also import a broker contract note for F&O and equity round trips, then label each one with a strategy.
| Date | Strategy | Index | Expiry | Option | Entry Time | Entry Price | Qty | Amount Used | Fees | Exit Time | Exit Price | P&L | Result | P&L % | Slippage | Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No trades yet. | ||||||||||||||||
๐ฉบ Background Task Health
Each row maps a Beat task or long-running loop (strategy runner, order queue, monitor) to something observable in PostgreSQL, Redis, backup files, worker queues, or loop locks. Trading loops use a 30s Beat watchdog plus an in-process cycle (strategy ~2s, orders ~1s, monitor ~2s). Status reflects the current IST market session. Celery inspect must reach workers from this web process (same Redis broker).
| Task | Schedule | Queue | Status | Detail | Evidence |
|---|
๐ Feature Toggles
DB-backed toggles. Flipping one takes effect within a few seconds (super-admin only).
| Toggle | Description | Enabled |
|---|
๐ฏ๏ธ Candles
Inspect 1-minute OHLC stored in underlying_candles (index and F&O strike symbols).
Super-admin only (Scalping โ Candles). Times are Asia/Kolkata.
๐ก Redis Feeds
Live LTP Feed and order-updates Feed keys currently in Redis
(v2:ltp_feed:* / v2:order_feed:*). Super-admin only
(Scalping โ Redis data).
LTP keys expire quickly (default TTL 15s, reader max-age 5s); order updates last hours.
LTP Feed
| Symbol | Price | Age | Fresh | TTL | Captured (IST) |
|---|
Order Updates Feed
| Order ID | Status | Symbol | Segment | Qty / Filled | Fill Px | Age | TTL | Captured (IST) |
|---|
Candle Strategy Lab
Discover robust same-day strategies on CE/PE strike OHLCV from the same HF dataset as Dataset Candles โ not index LTP reconstruction. Each ATM-offset call/put series is analyzed on its own. Ranking prioritises out-of-sample expectancy, walk-forward consistency, and drawdown. Survivors export into Scalping โ Backtest as DRAFT configs.
Survivors
| Rank | Stream | Strategy | Family | Status | SL % | Target % | Robustness | Test PF | Test R | Trades | Export |
|---|
Rejected (sample)
Scalping export payload
Strike Candle Lab
Discovers mechanical CE/PE option-strike candlestick strategies from the same HF dataset as Dataset Candles. Patterns are found on strike OHLCV, not the index chart. Training days are used to freeze rules; later days are out-of-sample only. Ranking uses net P&L after charges. The engine never forces a trade every day: it buys only when the pattern prints and a later bar breaks the pattern high. No entries at or after 15:15 IST; open trades flatten on the last bar before 15:15. Hits is how often the pattern appears; Trades is how many of those actually filled; Freq is pattern-days / eligible days. Open an example to see IST clock times and the strike candles; purple markers on the day chart are every pattern print (most will not fill).
Ranked strategies
| Rank | Strategy | CE/PE | Expiry | Pattern | Hits | Trades | Fill | Freq | Train WR | Test WR | Train PF | Test PF | Train net | Test net | Max DD | Score | Status |
|---|
Hits = pattern prints (train/test). Trades = fills taken (train/test). Fill = test trades รท test hits. Freq = test pattern-days รท eligible days. Quiet days with no pattern stay in the universe and take zero trades.
Mechanical rules
Example trades
Strike chart
Score Pattern Lab
Click Discover and the engine walks every ATM CE and PE candle on
5M and 10M for the selected index. Turn on
enable_score_pattern_lab_extra_timeframes to also search
1M, 30M, and 1H. Each timeframe, expiry vs
non-expiry, and CE vs PE stays a separate population. Score regions are
found on training data only. The target and horizon are chosen from training
median MFE (snapped to 5/10/15/20/30/50%) โ not typed in. Holdout dates are never
used for discovery, bins, target choice, or calibration. Historical hit rate is not a
probability.
| Job | Kind | Status | Index | Range | Progress | Elapsed | |
|---|---|---|---|---|---|---|---|
| No jobs yet. | |||||||
Score-space heatmap (Bullish Cont ร Bearish Cont)
Visualization slice only. Discovered targets come from training MFE. Holdout is never mixed in.
Patterns
Target, SL, and PF are what the algorithm selected. SL is training median MAE. Only patterns with profit factor โฅ 1.5 are listed.
| Pattern | Index | TF | Expiry | Opt | Region | Target | SL | PF | Horizon | Train N | Val N | Test N | Train hit | Val hit | Test hit | Avg | Med | MFE | MAE | Status |
|---|
Strategy Research Lab
Evaluate the Phase-1 catalog on CE/PE strike OHLCV (HF Dataset / Broker) or synthetic demo series. Walk-forward OOS and expiry vs non-expiry stay as research dimensions. Ranking prioritises expectancy and robustness โ not max historical P&L. This lab does not invent or re-optimize strategies during market hours.
Best NIFTY
Best BANKNIFTY
Best SENSEX
Multi-index
Expiry specialists
Non-expiry specialists
Instrument grade matrix
| Strategy | NIFTY | BANKNIFTY | SENSEX | Classification |
|---|
Strategies (click row for narrative / WF)
| Strategy | Class | Best | Robust | NIFTY ExpR | BN ExpR | SX ExpR | WF | Trades N/B/S |
|---|
Run research, then select a strategy row.
Day-type classifications
| Strategy | Instrument | Day-type class | Expiry adv | Exp ExpR | Non ExpR | Exp trades | Non trades | Notes |
|---|
Live Strategy Monitor
Monitors validated strategies on closed 1-minute candles during market hours. Detects setup development (FORMING โ READY โ TRIGGERED). Does not discover or optimize strategies live. NO TRADE is a valid outcome every minute. Paper mode records outcomes separately from research.
Active setups
| Instrument | Strategy | State | Direction | Entry | SL | Target | R:R | Score |
|---|
Select a setup row to view explanation.
Validated registry
Daily paper report
๐งช Option Buy Backtest
Backtest expiry-day ATM option buying using option-chain snapshots. Choose a Data Source and Run On to control which snapshots are analyzed. Ranges over 45 days run in the background on celery-worker-long (progress shown in status).
| Date | Day | Instrument | Type | Strike | Entry Time | Exit Time | Entry | Exit | Exit Reason | P&L | Return % | Max % | Min % | Re-buys | Trades |
|---|
๐ง Clustering Calibration
Configure Option Chain Clustering calibration and drift retrain controls.
๐งน Clear Auto Success Guard
Clear today's composite dedup guard rows. New guard identity is
STRATEGY_ID|USER_ID|BROKER_NAME|INDEX|AUTOMATIC_ENTRY_TIME.
For chained runs, key format is
SUPER_PARENT_STRATEGY_ID|STRATEGY_ID|USER_ID|BROKER_NAME|INDEX|SUPER_PARENT_STRATEGY_ENTRY_TIME.
Pick the exact combo below. Use “Clear All Today” to clear every guard for the current IST day and allow re-run of that day's entries.
Today's success guards in Redis
One row per Redis key. Clear row removes only that key. Parsed columns may show “unknown” if the key predates the v2 format.
| Kind | Format | Strategy | User | Index | Broker | Side | Entry time | Dir | TTL | Redis key | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Open this section or click Refresh table to load keys. | |||||||||||
โ๏ธ Execution Slice Config
Configure per-index max quantity per execution slice. Orders above these limits are split into multiple executions.
๐ก๏ธ Protected Bulk Buy
Adaptive protected BUY for Equity MIS. Child orders are LIMIT at the
effective price cap. Never places a MARKET of the full target quantity
unless enable_batch_market is on (then MARKET
batches of max_qty_for_market_batch with 0.1s delay; that FT
overrides enable_protected_bulk_buy and enable_adaptive_smart_exit).
FNO slicing
is unchanged. LTP Feed cache is price-only and is not used
as a fake order book.
Manage app broker (Groww)
| Name | Actions |
|---|
๐งฎ ATM Affordability
Checks if each active subscription has enough allocated money to buy at least 1 ATM lot.
| User ID | User | Strategy ID | Strategy | Broker | Index | Side | Allocated | Lot Size | ATM Strike | ATM LTP | 1 Lot Required | Shortfall | Top-up Required | Status | Reason |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Open this section and click Refresh. | |||||||||||||||
๐ฒ Daily Random Option Type
Shows the globally shared RANDOM CALL/PUT resolution generated once per IST day.
| Business Date | Resolved Side | Source | Strategy ID | Seed Context | Created At | Audit ID |
|---|---|---|---|---|---|---|
| Open this section and click Refresh. | ||||||
๐ Strategy Executions
Track your strategy executions and monitor real-time P&L updates.
| Strategy | Sell Configs | Health | Time to Exit | Broker | Order / Fill | Index | Group | Chain ID | Symbols | Status | Entry Price | LTP | Progress | Entry Cost | Qty | Target % | SL % | Exp. Profit | Exp. Loss | Current P&L | P&L % | Peak % | Locked โน | Exit P&L | Entry Time | Exit Time | Active Time | Actions | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Loading executions... | |||||||||||||||||||||||||||||
๐งน Data Management
Super admin tools for correcting historical data.
Delete PnL Ticks by Date
Choose a date and delete ALL live P&L ticks per execution for that IST day. Use Flush buffer on a row to drain Redis into the DB (e.g. missing final segment after exit). Full repair controls (sync archive, manual tick) are on Execution View.
| Execution ID | Live Ticks | Archived Ticks | Total Ticks | Last Tick Timestamp | Actions |
|---|---|---|---|---|---|
| Load a date to view executions with live P&L ticks. | |||||
๐ฅ Backtest Data Ingestion
Load historical 1-minute index-options data (HuggingFace
thetrademarkk/india-index-options-1m) into the snapshot
store that powers Option Buy Backtest. Front-expiry-per-day
is stored so both Expiry and Non-Expiry backtest modes work. Ingested rows
are tagged hf_dataset; deletes only touch those rows.
Re-running an index over the same date range replaces the
existing rows for that range (no duplicates); non-overlapping ranges are kept.
Download from HuggingFace
Re-runs skip expiry files already in coverage. They do not wipe NIFTY / BANKNIFTY / SENSEX and start over. Only one ingestion job can run at a time. To replace data, delete it under Coverage & Cleanup first.
Upload parquet
For an offline/locked-down server. Upload the index spot file
({SYMBOL}.parquet) and one or more option expiry files
({EXPIRY}.parquet). The spot file is required.
Ingestion Jobs
Coverage & Cleanup
๐ฏ๏ธ Dataset Candles
Stored HuggingFace snapshots plus live 1m LTP bars (ATMยฑ10, IST). Expand for timeframe, live match, and volume notes.
Stored HuggingFace snapshots plus live-data 1m bars from the LTP Feed (ATMยฑ10, IST). Today is listed while the market is open. Each day lists INDEX plus ATM ยฑ10; use ATM / ATM-1 / ATM+1 to jump, or pick INDEX, CE, or PE. Live ATM follows the latest index close. Live days poll about every 5s. 1/5/10/30m, 1h, and 4h buckets start at 09:15 IST; 1D is that IST session day. Changing timeframe reloads the series and recomputes the price-action strip. On a historical day, set End time (IST) to score (and chart) only bars through that minute. Live days use now and the forming bar. On a live day the four price-action scores are matched automatically against frozen Score Pattern Lab regions (1mโ1h). No match means NO VALIDATED HISTORICAL EDGE, not a 0% probability. Volume is stored parquet volume on HF days (live-data bars have no volume).
๐จ Hammer Lab
Choose inverted-hammer 30m bars on ATM CE/PE (past ingested days only). Buy the opposite option at the next 30m open. Analyse / Re-run uses this index + date type and every chosen date (From/To and the day dropdown only navigate while picking). Capital (โน28,000) and Suggested SL are questions โ edit and Re-run without re-selecting candles.
Chosen hammers
0Questions
Parameters (Capital, Suggested SL, one-trade-per-day) can change; Re-run uses every chosen date for this index and date type.
๐๏ธ Archived Executions
View archived strategy executions with pagination, sorting, and search.
๐ Performance Dashboard
| Strategy | Broker | Index | Symbols | Order Type | Status | Entry Cost | Current P&L | P&L % | Exit P&L | Entry Time | Exit Time | Archived At | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Loading archived executions... | ||||||||||||||
๐งช Test Brokers
Test broker client methods: get_option_chain and get_price
๐ฌ Test Strategy Code
Test strategies by reading their code from the database. Select a strategy that has code saved, and a broker to fetch market data. The strategy code will be executed dynamically and results displayed.
๐ Broker Client Tester
Probe App Broker client methods using credentials from Manage App Broker
(data/brokers.json). Super-admin only. Read-only probes:
order detail (including Groww GTT/OCO) and strike/index symbol LTP
(same path as scalping get_symbol_ltp).
๐ Market Holidays
Market Status
Loading market status...
Loading holidays...
๐ฏ ATM Strikes
ATM ยฑ10 CE and PE trading symbols for the nearest expiry. Select an index, then copy symbols individually or in bulk. Refresh pulls the latest chain.
| ATMยฑ | Strike | CE | PE |
|---|---|---|---|
| Select an index to load ATM ยฑ10 symbols. | |||
๐ Next Expiries
Next expiry date for each supported index. NIFTY and SENSEX use weekly expiry; BANKNIFTY uses monthly (no weekly expiries).
| Index | Next Expiry Date | Day | Days from Today |
|---|
๐ Strategy Cancellation Mapping
Group strategies for today: when one strategy in a group executes, the others in the group are cancelled. Groups apply to today only and reset each business day.
| Group ID | Strategies | Actions |
|---|
๐ Expiry Dates Calculator
Validate expiry dates calculated by the utility for NIFTY, BANKNIFTY, and SENSEX.
Note: NIFTY expires on Tuesday (weekly & monthly), BANKNIFTY expires on Tuesday (monthly only, no weekly), SENSEX expires on Thursday (weekly & monthly).
If expiry day is a trading holiday, expiry moves to the previous trading day.
๐ Strategies
๐ Equity Movers
Liquid NSE cash names (Groww intraday-enabled, 6-month ADV scan), ranked by live LTP Feed day move. Default filter is +7% vs previous close for the first-step 7% strategy screen.
| # | Symbol | Company | Industry | LTP | Prev close | Day open | Day % | Open % | Avg TO (Cr) | Avg vol | Quote |
|---|
Equity ยท Auto Buy
Equity Auto Buy Logs
Live narrative of the Auto Buy daemon: signal match, day lock, allocated amount, LTP, MIS margin, qty, order placement, and fills. Newest lines first.
Equity ยท Market hours
Equity Auto Buy Rules
Configure reusable OPEN% Auto Buy rules. The Rule Engine evaluates liquid movers in market hours and routes eligible symbols to the Equity Buy Engine via a mapped strategy.
Rule editor
Active rules require a mapped Equity strategy ID.
Configured rules
OPEN% band, strategy mapping, and IST trading window.
| ID | Name | Active | OPEN% | Ref | Strategy | Limits | Window | Actions |
|---|
Purchased today
Symbols filled by Auto Buy this IST day.
Qualifying now
Symbols currently matching an active rule.
โ Create/Edit Strategy
โ๏ธ Execution Variables
Define variables that will be collected from users when executing manual strategies. These values are merged into strategy_config at execution time.
๐งฉ Map Strategy with Code
Map reusable code templates to strategies. This page is visible only to super admins.
All Strategy Code Mappings
| Strategy | Code Template | Actions |
|---|---|---|
| Loading mappings... | ||
๐ Broker Credentials
Manage your broker API credentials. Credentials are encrypted and stored securely.
| Broker | User | Configuration | Status | Actions |
|---|---|---|---|---|
| Loading credentials... | ||||
๐ Strategy Subscriptions
Subscribe to strategies and allocate money for automated trading.
| User | Strategy | Allocated Money | Status | Created | Actions |
|---|---|---|---|---|---|
| Loading subscriptions... | |||||
๐ฅ User Management
Manage users, roles, and privileges. Super Admin access only.
| ID | Username | Roles | Emergency Wallet | Status | Created | Actions | |
|---|---|---|---|---|---|---|---|
| Loading users... | |||||||
๐ Save Strategy Code
Manage reusable strategy code templates. Super Admin access only.
Add New Code Template
Saved Code Templates
| Code Name | Description | Created | Actions |
|---|---|---|---|
| Loading code templates... | |||
๐ฏ Sell Configurations
Define exit rules that override default SL/Target/Break-even when attached to a strategy.
Create Sell Configuration
Saved Sell Configurations
| Name | Type | Parameters | Status | Updated | Actions |
|---|---|---|---|---|---|
| Loading sell configurations... | |||||
โก Scalping Configurations
Define intraday scalping processes linked to scalp strategies. Backtest SL/TGT apply to simulation and calibration only. Optional live SL/TGT override strategy defaults for real exits; leave blank to use the linked strategy.
Create Scalping Configuration
Saved Scalping Configurations
| Name | Index | Strategy | Status | Active | Can run Today? | Updated | Actions |
|---|---|---|---|---|---|---|---|
| Loading scalping configurations... | |||||||
๐ Scalping Backtest
Replay HF / broker option-chain snapshots through a scalping configuration. Uses config backtest SL/TGT and full F&O charge estimates.
Trades
| Date | Signal | Symbol | Entry | Exit | Slip % | Reason | Gross | Charges | Net |
|---|---|---|---|---|---|---|---|---|---|
| Run a backtest to see trades | |||||||||
๐๏ธ Scalping Calibration
Sweep backtest SL/TGT, candle height, and candle type (DEFAULT/SPECIAL/REVERSAL/CUSTOM) over a configuration.
Leave axes blank to keep the config baseline. Ranking keeps trials with โฅ1 trade;
per-day trade cap uses the configurationโs max_trades_per_day. Max 72 combinations.
โถ Scalping Runs
Live runtime: start/pause/resume/stop with trading PIN (buttons show progress while the request runs). Open a run for story log, OHLC candles, and trades with buy/end times and colored PnL. New runs are live (STRIKE CE/PE premium candles); paper is only preserved on historical snapshots.
| ID | Config | Date | Status | Trades | Latest | Trigger | Actions |
|---|---|---|---|---|---|---|---|
| No runs yet | |||||||