Introduction
What is Option Pilot?
Option Pilot is a fully autonomous desktop trading assistant for Indian equity options. It runs a rule-based Dynamic Signal Engine v2.9 that evaluates 94 technical indicators, resolves one of 6 signal types using confidence voting, and executes orders through your broker's official API โ all locally on your machine with zero cloud dependency.
๐ Paper โ Free Forever
๐ Live โ Real Orders
๐ Backtest โ Free Forever
Architecture Overview
| Dynamic Signal Engine v2.9 | Evaluates 94 indicators using confidence voting. Produces BUY_CALL/PUT, EXIT_CALL/PUT, HOLD, or WAIT. |
| Risk Manager (QObject) | Daily loss limit, max trades, kill switch. Emits risk_breach pyqtSignal on breach. |
| Order Executor | Thread-safe per-order state machine. Handles PENDING โ SUBMITTED โ FILLED / CANCELLED / REJECTED. |
| Position Monitor | Watches open positions. Applies STOP/TRAILING/FIXED exit logic on every tick. |
| Trend Detector | Evaluates strategy signals with confidence threshold filtering and state_manager integration. |
| MTF Filter | EMA(9/21) crossover alignment check across 1m/5m/15m derived from 1-minute candles. |
| CandleStoreManager | Per-symbol OHLCV store with multi-timeframe resampling. Separated from TradeState. |
| WebSocketManager | Manages real-time broker data feed with auto-reconnect. |
| TradeState (Singleton) | Thread-safe RLock-protected central state. All property access via getter/setter pairs. |
| SQLite via SQLAlchemy 2.0 | Local database: settings, orders, strategies, re-entry counts, config KV store. |
Installation
Installing Option Pilot
System Requirements
| OS | Windows 10+ (64-bit) ยท macOS 11 Big Sur+ (Intel + Apple Silicon) ยท Ubuntu 20.04+ (64-bit) |
| RAM | 4 GB minimum ยท 8 GB recommended |
| Disk | 500 MB installation + trade log storage |
| Internet | Required during market hours for data feed |
| Broker | API developer access enabled at your broker |
| Architecture | 64-bit only. macOS universal2 (arm64 + x86_64) supported. |
Platform Notes
Windows
Run the .exe installer. If Windows SmartScreen appears, click "More info โ Run anyway". Start Menu shortcut created automatically.
macOS
Open the .dmg, drag to Applications. On first launch: right-click the app icon โ Open to bypass Gatekeeper. Not notarised by default.
Linux (Ubuntu)
Install libxcb-xinerama0 and libqt5gui5 first: sudo apt install libxcb-xinerama0 libqt5gui5. Then: chmod +x option-pilot-linux && ./option-pilot-linux
Broker Setup
Connecting Your Broker
All brokers use OAuth2 โ you authenticate on your broker's website, never inside Option Pilot. The app stores only the access token locally.
Setup Steps (All Brokers)
- Log in to your broker's developer portal and create a new API app.
- Set the Redirect URL to:
http://127.0.0.1:8000/broker/fyers (or as shown in the app)
- Copy your App ID / Client ID and Secret Key.
- In Option Pilot: Settings โ Brokerage Settings โ Broker tab
- Select your broker, enter App ID and Secret Key, set Redirect URI, click Save Settings.
- Click Open Login URL โ your browser opens your broker's OAuth login page.
- Log in on your broker's page. After success, copy the redirected URL.
- Paste the URL or auth code into the popup. Click Complete Login.
Broker tokens expire daily. Option Pilot prompts re-authentication on startup if expired. The renewal flow takes under 30 seconds via the BrokerLoginPopup.
Supported Brokers
Fyers
Zerodha
Dhan
Angel One
Upstox
Shoonya
AliceBlue
Flattrade
Strategy Editor
Building a Strategy
Open the Strategy Editor from Tools โ Strategy Editor or the main toolbar. Tabs: Info, Signal Rules, Indicators, Help.
Engine Settings (Info tab)
| min_confidence | 0.60 (60%) | Minimum confidence to fire a signal. 0.0โ1.0 scale. |
| conflict_resolution | WAIT | What to do when BUY_CALL and BUY_PUT both fire. Options: WAIT, BUY_CALL, BUY_PUT. |
| Timeframe | 1m default | Candle interval for strategy evaluation. |
Signal Groups (Signal Rules tab)
5 signal groups per strategy. Each group can be independently enabled/disabled and uses AND or OR logic:
BUY_CALL โ open CALL position
BUY_PUT โ open PUT position
EXIT_CALL โ close CALL position
EXIT_PUT โ close PUT position
HOLD โ maintain, suppress entry signals
Adding a Rule
- Select the signal group tab (e.g. BUY_CALL).
- Click + Add Rule.
- In the LEFT SIDE: choose indicator type โ select indicator (e.g. MACD) โ select sub-column (e.g. Histogram) โ set lookback bars.
- Set OPERATOR: >, <, >=, <=, ==, !=.
- Set RIGHT SIDE: choose scalar value (e.g. 0.0) or another indicator.
- Set WEIGHT (the confidence contribution of this rule, e.g. 1.5).
- Click Save. Activate the strategy with Activate This Strategy.
Indicators
94 Indicators โ Quick Reference
All indicators are from pandas_ta. Browse the full library in Strategy Editor โ Indicators tab. Use the filter box to search by name.
RSI
MACD
Stoch
StochRSI
CCI
TSI
UO
AO
KAMA
ROC
RVI
TRIX
WillR
DM
PSL
EMA
SMA
WMA
HMA
DEMA
TEMA
TRIMA
VIDYA
ADX
Aroon
AMAT
CHOP
CKSP
PSAR
Supertrend
BBands
ATR
KC
NATR
Donchian
MassI
HWC
True_Range
OBV
CMF
MFI
AD
ADOSC
EFI
EOM
KVO
NVI
PVI
PVT
ZScore
Entropy
Kurtosis
MAD
StDev
Variance
Skew
Fisher
Squeeze
LinReg
PPO
Slope
HA
HWMA
+ 35 moreโฆ
See the Features page โ Indicator Library for the complete table with default parameters and suggested weights.
Risk Controls
Profit & Stoploss โ All Parameters
Configure via Settings โ Profit & Stoploss. Settings applied immediately to running TradeState.
| Parameter | Default | Description |
profit_type |
STOP |
Exit mode: STOP, TRAILING, or FIXED |
tp_percentage |
15.0% |
Take-profit threshold above entry |
stoploss_percentage |
7.0% |
Stop-loss threshold below entry (stored positive) |
trailing_activation_pct |
10.0% |
TRAILING: price must rise this % before trailing engages |
trailing_sl_at_activation |
5.0% |
TRAILING: SL jumps to this % above entry on activation |
trailing_first_profit |
3.0% |
Legacy compatibility parameter |
max_profit |
30.0% |
FIXED: maximum profit cap per trade |
profit_step |
2.0% |
FIXED: profit step size per bar |
loss_step |
2.0% |
FIXED: loss step size per bar |
Re-Entry Guard
Re-Entry Guard โ All Parameters
Configure via Settings โ Re-Entry Settings. All state persists in SQLite across app restarts.
| Parameter | Default | Description |
allow_reentry |
True |
Master on/off switch for re-entry logic |
min_candles_after_sl |
3 |
Candles to wait after stop-loss exit |
min_candles_after_tp |
1 |
Candles to wait after take-profit exit |
min_candles_after_signal |
2 |
Candles to wait after signal exit |
min_candles_default |
2 |
Fallback cooldown for unknown exit reason |
same_direction_only |
False |
If True: only block re-entry in same direction. Opposite direction always allowed. |
require_new_signal |
True |
Must see a fresh BUY signal after cooldown. Old signal still active is insufficient. |
price_filter_enabled |
True |
Block re-entry if current price diverged too far from entry |
price_filter_pct |
5.0% |
Max allowed price divergence from entry price |
max_reentries_per_day |
0 (unlimited) |
Hard cap on re-entries per trading day. Persisted across restarts. |
MTF Filter
Multi-Timeframe Filter
Optional filter that checks EMA trend alignment across multiple timeframes before allowing a signal to fire. Enable in Daily Trade Settings โ MTF tab.
| Parameter | Default | Description |
use_mtf_filter |
False |
Enable/disable the MTF filter |
mtf_timeframes |
1,5,15 |
Comma-separated timeframe minutes to check |
mtf_ema_fast |
9 |
Fast EMA period for crossover check |
mtf_ema_slow |
21 |
Slow EMA period for crossover check |
mtf_agreement_required |
2 |
Minimum timeframes that must agree on direction |
Higher-timeframe data is derived from the 1-minute OHLCV data already loaded โ no additional broker API calls are made for the MTF check.
Trading Modes
Paper, Live & Backtest Modes
Paper (Simulation)
Virtual money. Default balance โน1,00,000. Optional slippage simulation (default 0.05%). Identical signal engine and risk controls to live. Free forever. No subscription required.
Live
Real orders placed through broker API. Must be explicitly enabled (safety toggle is OFF by default). Optional per-trade confirmation dialog. Requires Live Pro subscription.
Backtest
Bar-by-bar replay of historical 1-minute candles. Black-Scholes option pricing with VIX cache. Same signal engine and all risk controls. 5 tabs: Overview, Trade Log, Strategy Analysis, Equity Curve, Candle Debug. Free forever.
Backtesting
Running a Backtest
Open from Tools โ Strategy Backtester. Configure strategy, timeframes, instrument, and date range on the right panel. Click โถ Run Backtest.
Backtest Result Metrics
Net P&L
Total Trades
Win Rate %
Winners
Losers
Best Trade
Worst Trade
Avg Net P&L/Trade
Max Drawdown
Profit Factor
Sharpe Ratio
Data Source
5 Analysis Tabs
| Overview | 10 performance metrics in a grid. Net P&L, Win Rate, Profit Factor, Sharpe Ratio, Drawdown, and more. |
| Trade Log | Every trade: entry time/price, exit time/price/reason, hold bars, P&L, option symbol. |
| Strategy Analysis | Rule contribution analysis. Which rules fired most, confidence distribution. |
| Equity Curve | Portfolio value over time. Visualises drawdown periods and recovery. |
| Candle Debug | Inspect exact indicator values and signal evaluations for any individual candle. |
Notifications
Setting Up Telegram Alerts
- Open Telegram, search @BotFather, send
/newbot. Follow prompts. Copy the Bot Token.
- Send any message to your new bot. Then open:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates in your browser.
- Find your Chat ID in the JSON response (e.g.
"id": 123456789).
- In Option Pilot: Settings โ Brokerage Settings โ Telegram tab
- Enter Bot Token and Chat ID. Toggle Enable. Click Send Test to verify.
Alert Events
Trade entry
Trade exit (TP hit)
Trade exit (SL hit)
Kill switch activated
Daily loss limit reached
Token expired โ renewal needed
Broker disconnected
Daily target reached
Quick Reference
Common Actions
| Start trading | Click green Start button in main toolbar |
| Stop trading | Click Stop button (manual kill switch) |
| Switch mode | Mode selector dropdown (Paper/Live/Backtest) |
| Open Strategy Editor | Tools โ Strategy Editor |
| View signal evaluation live | Tools โ Signal Intelligence Console |
| View trade history | History tab or Tools โ Trade History |
| Update broker token | Settings โ Brokerage Settings โ Open Login URL |
| Change risk limits | Settings โ Profit & Stoploss |
| Change re-entry settings | Settings โ Re-Entry Settings |
| Enable MTF Filter | Settings โ Daily Trade Settings โ MTF tab |
| Test Telegram | Settings โ Brokerage Settings โ Telegram tab โ Send Test |
| View system resources | Tools โ System Monitor |
| View connection status | Tools โ Connection Monitor |
| View app logs | Tools โ Log Viewer |
| Run backtest | Tools โ Strategy Backtester โ Run Backtest |