COMPLETE INTERACTIVE SETTINGS ENCYCLOPEDIA

Frontend Settings & Options Guide

Every single field, threshold, switch, and mathematical parameter on your ⚙ Settings panel explained in crystal-clear plain English. Discover exactly how the algorithmic engine interprets each value, why settings never conflict, and optimal configurations for different market styles.

50+
Parameters Covered
10
Settings Modules
0
Logical Conflicts
100%
Hot-Reloadable Mid-Trade
HOW THE SETTINGS WORK TOGETHER

From configuration to a managed trade

Settings define the market and size, then the engine checks its safety rules before it can act. This overview shows the path and where protective controls apply.

1. Settings-to-trade flow

  1. 01 · Configure Choose broker & market

    Set the symbol, expiry, quantity, and paper or live mode.

  2. 02 · Validate Check eligibility

    Session, instrument, capital, and risk rules are evaluated.

  3. 03 · Analyze Apply strategy filters

    Signals and configured thresholds determine whether conditions qualify.

  4. 04 · Manage Track orders & exits

    Approved actions go to the selected mode and are monitored by exit rules.

Changing a setting configures behavior; it does not guarantee a signal, order fill, or trading result.

2. Protective controls around a position

  1. Entry Position opens

    Only after the configured mode and broker checks allow the action.

  2. Protect Stop & limits apply

    Configured stop-loss, quantity, and risk limits guide management.

  3. Manage Trail or exit

    Trailing rules can update protection; exit conditions close the position.

Safety layers: Paper mode, broker-session checks, and risk gates are separate controls. Review each before enabling live orders.
Showing 50 settings
🔑

1. Broker & API Authentication

Controls broker integration, API endpoints, encrypted cloud credential storage, and network proxy access.

Default Broker

broker
Default: zerodha Dropdown
Selects which broker account powers live market feeds, options Greeks, order execution, and position tracking.
Engine Mechanics: Instantiates KiteClient or AliceBlueClient. The engine guarantees that cached session tokens for one broker are never sent to the other. Switching brokers safely purges stale instruments.
Recommended: Select Zerodha for Kite Connect or Alice Blue for zero-brokerage F&O trading.

Kite API Key & Secret

kite_api_key / secret
Default: Empty Encrypted String
Your unique API credentials generated from the Zerodha developer portal (kite.trade).
Engine Mechanics: Stored using AES-256 encryption. On daily Login, creates the official OAuth handshake URL and exchanges the token for today's session.
Safety Note: Never share your API Secret. The system automatically masks secrets in the browser interface.

Alice Blue App Code & Secret

alice_app_code / secret
Default: Empty Encrypted String
Your ANT API application credentials obtained from a3.aliceblueonline.com.
Engine Mechanics: Powers Alice Blue ANT v2 REST and WebSocket feeds. Supports auto-login with session caching across restarts.

Corporate Proxy Support

proxy.enabled / host / port
Default: false Object
Enables HTTP/HTTPS proxy forwarding for traders running behind corporate or VPS firewalls.
Typical Use: Keep disabled unless your hosting provider or enterprise office network mandates an outbound proxy.
📊

2. Instrument Selection, Expiry & Sizing

Defines what asset you trade, contract maturity selection, execution sizing, and simulation mode.

Trading Script / Segment

index
Default: NIFTY String
The active underlier for analysis and execution. Supports NSE Index (NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY), BSE (SENSEX, BANKEX), MCX (CRUDEOIL, NATURALGAS, GOLD, SILVER), and individual F&O stocks.
Engine Mechanics: _resolve_spot_tradingsymbol() dynamically binds the spot feed, strike interval (e.g. 50 for NIFTY, 100 for BANKNIFTY), exchange (NSE/BSE/MCX), and trading session hours.

Base Lots

lots
Default: 1 or 2 Integer >= 1
The standard number of exchange lots bought when an entry trigger fires.
Engine Mechanics: Multiplies the contract's official lot size (e.g. NIFTY = 25 or 75 shares/lot). If VIX Lot Sizing is active, the engine dynamically scales this base value down during extreme volatility and up in calm markets.
Recommendation: Start with 1 lot in Paper mode. Never scale lots until your win rate is consistent.

Paper Mode vs Live Mode

dry_run
Default: true (Paper) Boolean Safety Lock
When true, all orders, fill simulations, trailing SLs, and P&L records run completely inside the local database journal without contacting exchange order books.
Conflict-Free Guarantee: Live mode requires active broker authentication. If broker session drops, the system refuses live execution and reverts to safety.

Expiry Selection Mode

options_expiry_mode / date
Default: nearest Dropdown
Determines which contract maturity cycle is selected: Nearest (current weekly/monthly), Next, Far, or an exact date picker.
Engine Mechanics: Inspects broker instruments, filters out expired contracts, and picks the target maturity. Exact date picker overrides the mode when specified.

Dashboard Watchlist Pills

watchlist_symbols
Default: NIFTY, BANKNIFTY List of Strings
Quick-access live LTP pills displayed directly below the chart. Clicking any pill instantly switches the terminal's active script, chart, and analysis context.
🛡️

3. Risk Controls, Stop-Loss & Targets

Your financial safety net. Governs maximum allowable drawdowns, profit harvesting, and mandatory session square-offs.

SL / Target P&L Mode

pnl_mode
Default: COMBINED Enum
COMBINED: Evaluates net basket P&L across all legs (e.g., in a straddle, CE + PE profit/loss are summed together against one SL/Target).
INDIVIDUAL: Each option leg manages its own independent SL and Target.
Engine Mechanics: In COMBINED mode, straddle hedges can absorb temporary single-leg drawdowns as long as the net portfolio remains within the max_loss limit.

Stop-Loss (₹ Max Loss)

sl_enabled / max_loss
Default: ₹40,000 (Adjustable) Boolean + Float Capital Guard
Hard floor on trade loss. When net P&L drops to or below -max_loss, the monitoring loop immediately triggers market square-offs for all open legs.
Rule of Thumb: Calibrate this to 1%–2% of total trading account equity. Can be hot-reloaded mid-trade without restarting!

Target Profit (₹)

target_enabled / target_profit
Default: ₹10,000 Boolean + Float Profit Taker
Target reward threshold. Once total position profit reaches +target_profit, the engine books profit automatically (or triggers a partial exit if configured).

Force Square-Off Time (IST)

force_exit_time
Default: 15:15 / 15:29 Time (HH:MM)
Mandatory end-of-session square-off time to prevent overnight index option decay or penalty charges by brokers.
Intelligent MCX Buffer: Automatically extends to 23:25 IST when trading MCX commodities, respecting commodity session hours without human intervention.

Scheduled Time Exit

time_exit_enabled / time_exit
Default: false / 10:30 Boolean + Time
Optional clock-based exit (e.g. exit morning trades before the afternoon European market open at 12:30 or 14:00).
📈

4. Trailing Stop-Loss, Breakeven Ratchet & Partial Runners

Locks in earned gains and protects against sudden intraday sharp reversals.

⚡ Interactive Trailing SL & Breakeven Simulator

One-Way Ratchet Live Test

Drag the sliders below to see how your Stop-Loss line climbs dynamically as trade profit increases, and how it locks at breakeven (₹0) and trails behind peak profits without ever stepping backwards!

Current Peak P&L
₹2,500
Effective Stop-Loss Line
+₹1,900
Guaranteed Profit / Risk State
₹1,900 Locked (Risk-Free)

Trailing Stop Master Toggle

trail_enabled
Default: false Boolean
Enables the one-way ratchet trailing stop-loss algorithm in trail_sl.py.
One-Way Ratchet Rule: stop = max(previous_stop_line, candidate). The stop line only ever moves UPWARD toward profit; market pullbacks can never lower the stop line.

Breakeven Lock Threshold (₹)

trail_breakeven_profit
Default: ₹500 Float
When total trade profit reaches this figure, the stop line immediately jumps from -max_loss to ₹0.00, ensuring the trade can no longer turn into a loss.

Trail Distance Below Peak (₹)

trail_step_inr
Default: ₹300 Float
The trailing cushion maintained behind the trade's highest recorded peak. Candidate stop = Peak P&L − trail_step_inr.

Partial Exit at Target 1

partial_exit_enabled / pct
Default: false / 50% Boolean + Pct
When Target 1 is hit in COMBINED mode, automatically squares off a lot-aligned percentage (e.g. 50% of contracts) to bank guaranteed cash, while keeping the rest live for a bigger move.

Runner Target Profit (₹)

runner_target_profit
Default: 0 (1.5x Target 1) Float
Secondary profit goal for the remaining open lots after a partial exit. If set to 0, automatically defaults to 1.5 × Target 1.
🔄

5. Position Averaging (Disciplined Add-Ons)

Allows adding lots to an open position to improve average entry price while maintaining strict account risk bounds.

Offer Position Average

average_enabled
Default: false Boolean
Displays an interactive "Add Lot" action button on the live trade card while a position is open.
Capital Protection Guarantee: Adding lots recalculates average entry price, but does NOT expand your net max_loss cap in Combined mode. Account risk remains firmly capped.

Lots per Add & Max Add Count

average_add_lots / max_per_trade
Default: 1 lot / max 1 add Integers
Strictly caps how many lots are bought per average and limits the maximum number of times you are allowed to average a single trade.
Anti-Martingale Rule: Capping at 1 add prevents dangerous "revenge averaging" on losing trades.

Auto-Average at Premium Loss %

average_auto_enabled / loss_pct
Default: false / 15% Boolean + Pct
Automatically buys one average lot when an option contract's premium falls X% below initial entry price.
Safety Circuit: Enforces a min_age_seconds >= 30 gate so momentary opening tick volatility cannot trigger accidental duplicate adds.

Target Boost After Average (%)

average_reward_pct
Default: 0% Percentage
Optionally raises your profit target by a percentage after averaging down, rewarding the trade for holding more contracts.
🤖

6. AI Sentiment & Large Language Models

Integrates institutional LLMs (Google Gemini & Anthropic Claude) to assess macroeconomic context, news flow, and sentiment.

AI Provider & Model Selection

ai_provider / gemini_model / claude_model
Default: gemini Provider Enum
Choose between Google Gemini (e.g. gemini-3.5-flash or gemini-2.5-flash) or Anthropic Claude (e.g. claude-sonnet-4-6).
Safety Constraint: AI sentiment acts strictly as a safety conflict check, never an unconstrained override. If probability screams CALL but AI is NEGATIVE, the system hedges into BOTH or refuses entry.

Custom AI Note (Trader Insight)

custom_ai_note
Default: Empty Text Area
Inject your own personal market notes directly into the AI prompt (e.g., "RBI monetary policy announcement at 11:00 AM" or "US Fed rate decision tonight").
🎯

7. Mathematical Strategy Edge & Profitability Gates

The quantitative heart of the engine. Derives expected moves, option chain walls, momentum boundaries, and breakeven cushions.

Profit Margin Factor

profit_margin_factor
Default: 1.15 (15% Cushion) Float >= 1.0
Required move multiplier over live ATM option premium breakeven. 1.15 means today's VIX expected move must beat the option's cost by at least 15% before a directional trade is approved.
Why This Matters: It prevents buying expensive options on low-volatility days where time decay (theta) would eat the premium before the index reaches target.

Call & Put Probability Thresholds

call/put_probability_threshold
Default: 0.55 / 0.45 Probabilities [0.0 - 1.0]
The decision band outside which a genuine statistical edge exists. >= 55% favors CALL, <= 45% favors PUT. The 45%–55% zone is recognized as a 50/50 coin-flip.

Momentum Min / Max Fractions

momentum_min/max_fraction
Default: 0.25 / 0.65 Fractions
Filters intraday momentum: moves under 25% of the expected range are discarded as noise. Moves exceeding 65% are considered exhausted (avoids buying at the top or selling at the bottom).

OI Build-Up / Unwind Clamp (±%)

oi_change_clamp
Default: 0.5 (±50%) Ratio
Caps how much a single trading day's open interest swings at support/resistance walls can influence the directional probability model.

PCR Baseline & ORB Window

pcr_threshold / orb_minutes
Default: 0.15 / 15 mins Numbers
pcr_threshold: Baseline Put-Call Ratio sensitivity.
orb_minutes: The opening candle duration (from 09:15 IST) used to construct the initial range high/low boundaries.

Range Lookback & Gap Multiplier

range_lookback_days / gap_factor
Default: 15 days / 1.0x Numbers
Number of prior sessions used to calculate the historical average daily range and evaluate whether today's opening gap is abnormally large.
⚡

8. Automated Execute Regime Filters (Entry Vetoes)

Independent veto checks applied strictly after analysis. If hostile conditions exist, cancels order placement and logs an informative reason.

Enable Regime Filters

regime_filter_enabled
Default: false Boolean
Master switch for all automated regime veto checks. When disabled, trades execute based solely on probability and premium profitability.

Block Large Gap Days

regime_block_large_gap
Default: true Boolean
Blocks entry when the opening gap exceeds the historical average. Abnormally large gaps often suffer violent gap-fill reversals or chop.

Block Tight Expected Range

regime_block_range_too_tight
Default: true Boolean
Vetoes entry when India VIX implies today's likely trading move is smaller than minimum required thresholds, preventing option buying in dead markets.

Block Narrow CPR & Neutral ORB

regime_block_narrow_cpr / neutral_orb
Default: false Booleans
Narrow CPR: Skips trading when yesterday's Central Pivot Range was abnormally compressed.
Neutral ORB: Blocks entry if spot price has not cleanly broken outside the opening 15-minute range.

Min Volatility Confidence (0–100%)

regime_min_volatility_confidence
Default: 0 (Off) Integer [0–100]
Requires the engine's composite 0–100% Volatility Confidence score to reach a minimum quality bar before entering. Set to 0 to disable.
🔍

9. Auto-Scanner (Background Multi-Symbol Worker)

Runs sequential background evaluations across multiple symbols (e.g. NIFTY, BANKNIFTY, CRUDEOIL) on a configurable timer.

Scanner Toggle & Interval

auto_scanner.enabled / interval_minutes
Default: false / 5 mins Boolean + Minutes
Activates the sequential symbol scanner thread. Sleeps for the configured cooldown (minimum 3 minutes) between runs.
Engine Concurrency Lock: The scanner will NEVER interrupt an active trade. If the engine is busy, the scanner politely skips and waits.

Paper Lock & Session Bounds

require_dry_run / only_during_session
Default: true / true Booleans Safety Locks
require_dry_run: Restricts the auto-scanner to Paper mode, ensuring unattended background automation cannot place accidental live orders.
only_during_session: Automatically checks exchange schedules (e.g. NSE shuts down at 15:30 while MCX runs until 23:55).

Follow Chart & Continuous Scan

follow_chart / scan_after_trade_exit
Default: true / true Booleans
follow_chart: Dynamically switches the dashboard chart view to whatever symbol is being scanned.
scan_after_trade_exit: Keeps scanning for new opportunities once a previous trade finishes its exit cycle.

Per-Symbol Permission Matrix

auto_scanner.symbols
Default: Configurable list List of Rules
Granularly specify for each symbol whether it is permitted to take CALLs, PUTs, or BOTH (straddles). If an analysis yields a direction you have disabled, the scanner cleanly skips entry.