Rock Solid Strategy Structure
Six core fault-tolerance guarantees engineered into every Algoh bot so live execution never breaks under real market stress.
Cascading Order Verification (Entry → SL → Fill Check)
Dependent orders are never fired blindly. Each execution leg confirms real broker fill status before advancing to stop-loss or target placement.
The execution state machine polls broker orderbooks and WebSocket callbacks until Entry is COMPLETE, dispatches SL/Target legs using exact filled price and quantity, and confirms SL is OPEN or TRIGGER_PENDING.
If an entry order rejects for margin while the bot assumes it filled, blind SL/target orders can open unwanted reverse naked positions.
5-Layer Storage Fallback (DB → Backup DB → CSV → JSON → Text)
Active positions, stop-loss levels, and trailing targets persist across a five-tier failover chain so a primary database lock never blinds your strategy.
Every trade transition writes to the primary database first, automatically failing over to Backup SQLite, structured CSV, atomic JSON snapshots, and append-only recovery logs with full state reconciliation.
A database lock or disk hiccup during high volatility followed by a restart can erase active stop-loss tracking for open trades.
Self-Healing Retry & Token Recovery
Mid-session token expiry, transient 401/429 responses, or brief network drops are automatically detected, healed, and replayed safely.
A deterministic recovery wrapper catches session invalidation or API timeouts, triggers silent TOTP/token renewal, and retries the original order request strictly inside configured slippage bounds.
A mid-day broker token reset can leave a critical exit signal unexecuted while the market moves sharply against your position.
Execution-Above-All Priority Isolation
Your core signal evaluation and order placement loop is strictly isolated from peripheral UI, Telegram, chart, or analytics failures.
Non-blocking async queues decouple telemetry and notifications from the trading thread, ensuring logging or alert formatting glitches never interrupt active position management.
An unhandled exception in a notification formatter or dashboard query can crash the entire bot right before a stop-loss exit.
Disaster Management & Fallback Broker Failover
If your primary broker suffers an outage after entry, protective exit or counter-hedge orders can automatically route through a connected fallback broker.
Continuous API health and latency monitoring detects primary broker downtime or repeated 5xx failures and diverts emergency square-off or hedge orders to your secondary broker account.
A 45-minute primary broker API outage while holding live futures or options leaves your capital completely exposed.
Secure VPS Hardening & 30/70 Resource Pinning
Automated security patching combined with strict CPU/RAM pinning reserves 30% compute exclusively for Python trading scripts and 70% for everything else.
Systemd cgroups and process priorities guarantee your live trading daemons always retain 30% dedicated headroom while heavy charts, exports, or background jobs share the remaining 70%.
A heavy background log export or browser spike hitting 100% CPU can delay a time-critical stop-loss order by several seconds.
< 100ms Trade Execution
Sub-100ms signal-to-order dispatch on Mumbai co-located VPS nodes for sharp entries and exits.
Telegram Server Kill Switch
Square off open trades, stop daemons, or shut down the entire trading server directly from Telegram.
Daily Database & Project Backups
Automated daily snapshots of your Python code, databases, and strategy configs for instant restore.
Protected Orders & Backup Broker
Limit/SL-protected execution with automatic backup broker routing if your primary broker stalls.
What You Get Free With Your Strategy
Algoh Streaming Charts
Free self-hosted HTML5 charting terminal with 112+ indicators & multi-chart grids.
Custom Strategy Indicator
Your exact strategy converted into a chart indicator and pre-loaded on your terminal.
Regular Automated Backups
Scheduled backups of your bot code, databases, and strategy configurations.
Tight Server Security
Hardened VPS, auto-patching, SSL, and 30%/70% trading resource protection.
