How grv08singh/21_trading_app_cs works
This is an unattended intraday index-options trading bot for AngelOne, with paper and live execution sharing the same strategy and trade lifecycle. The principal workflow is market ticks and option-chain OI → candles and confirmed trend signals → risk-gated option selection → order execution → position exits, persisted state and P&L reporting. Startup authenticates and reconciles local state with broker positions before scanning. The graph uses documented calls and wiring; unsampled subsystem internals are represented only where the README or excerpts establish their role.
Main entry points: main.py App orchestrator · trade_manager.py Trade lifecycle · data_feed.py Market data feed · signal_engine.py Trend signals
Components 17
Startup and feeds
- App orchestrator
main.py - Configuration
config_loader.py - Market calendar
market_calendar.py - Instrument universe
instruments.py - Market data feed
data_feed.py
Signal and risk
- Candle builder
candle_builder.py - Trend signals
signal_engine.py - Risk gates
risk_manager.py
Trade execution
- Trade lifecycle
trade_manager.py - Paper/live executor
order_manager.py
State and reporting
- Day state
state_store.py - P&L workbook
pnl_logger.py - Notifications
notifier.py
External services
- AngelOne auth
auth.py - AngelOne SmartAPI
- Telegram / email
Other components
- Operator
Connections 26
- Operator → App orchestrator: starts
README.md - App orchestrator → Configuration: loads
main.py - App orchestrator → Market calendar: checks sessions
main.py - App orchestrator → AngelOne auth: initializes
main.py - AngelOne auth → AngelOne SmartAPI: authenticates
auth.py - App orchestrator → Day state: reconciles
main.py - Day state → AngelOne SmartAPI: reads positions
state_store.py - App orchestrator → Instrument universe: loads
main.py - Instrument universe → AngelOne SmartAPI: fetches quotes
instruments.py - App orchestrator → Market data feed: starts
main.py - Market data feed → AngelOne SmartAPI: streams and polls
data_feed.py - Market data feed → Candle builder: supplies ticks
candle_builder.py - Candle builder → Trend signals: supplies candles
candle_builder.py - Market data feed → Trend signals: supplies OI
data_feed.py - App orchestrator → Trend signals: scans signals
main.py - App orchestrator → Risk gates: checks entry gates
main.py - App orchestrator → Trade lifecycle: routes entries
main.py - Trade lifecycle → Instrument universe: resolves options
trade_manager.py - Trade lifecycle → Risk gates: checks exits
trade_manager.py - Trade lifecycle → Trend signals: checks reversal
signal_engine.py - Trade lifecycle → Paper/live executor: places orders
trade_manager.py - Paper/live executor → AngelOne SmartAPI: places live orders
order_manager.py - Trade lifecycle → Day state: persists transitions
trade_manager.py - Trade lifecycle → P&L workbook: records trades
trade_manager.py - Trade lifecycle → Notifications: sends events
trade_manager.py - Notifications → Telegram / email: delivers alerts
README.md