π Algo Trading Dashboard
A PHP + Bootstrap (dark theme) based dashboard for managing and monitoring algorithmic trading strategies. Supports strategy creation, paper/live trading modes, signal monitoring, live positions, and trade summaries, with file-based JSON storage (MySQL integration can be added later).
π Features π Strategy Management
Create, edit, clone, and delete strategies
Unique webhook URL generated for each strategy
Strategy parameters:
Stoploss
Trailing Stoploss
Profit Booking
Trailing Profit Booking
Activate in Paper Trade or Live Trade mode
π‘ Signal Processing
Accepts webhooks in JSON format:
{ "date": "{{timenow}}", "action": "BUY" }
Supported actions:
"BUY" β Buy Call
"SELL" β Sell Call
"SHORT" β Buy Put
"COVER" β Sell Put
π Dashboard
Overview of all strategies and their status
Live Nifty50, Sensex, BankNifty, and FinNifty data (via Upstox API)
Quick access to paper/live trades
π Signals & Orders
Signals Tab β list of all incoming signals per strategy
Orders Tab β list of all executed orders (paper + live)
Positions Tab β open live/paper trades across strategies
Daily Summary Tab β P&L for the day
π Market Data (Planned / Optional)
Options Chain view
Live stock data & charts
Overlay of executed orders and stoploss trails on charts
β‘ Tech Stack
PHP (vanilla)
Bootstrap 5 (Dark Theme)
JSON-based storage (easy migration to MySQL later)
Modular file structure
π Project Structure algo/ ββ public/ β ββ index.php # Dashboard home β ββ dashboard.php # Overview β ββ strategies.php # Strategy management β ββ signals.php # Signal list β ββ settings.php # Settings page β ββ css/ β β ββ style.css # Custom dark theme styles β ββ js/ β β ββ app.js # Client-side logic β ββ vendor/ β ββ bootstrap.min.css β ββ bootstrap.bundle.min.js ββ src/ β ββ helpers.php # Utility functions β ββ router.php # Simple PHP router β ββ storage.php # File-based storage handler ββ data/ β ββ strategies.json # Saved strategies β ββ signals.json # All incoming signals β ββ orders.json # Placed orders (paper/live) ββ config.php # Config settings
βοΈ Installation
Clone or download this repo into your htdocs (XAMPP) or web root.
C:\xampp\htdocs\algo\
Start Apache (XAMPP Control Panel).
Visit:
π Usage
Create Strategy
Go to Strategies Tab
Define parameters (Stoploss, Profit Booking, etc.)
Choose Paper or Live mode
Webhook URL
Each strategy has a unique webhook URL (generated automatically)
Send signals in JSON format:
{ "date": "2025-08-23 10:15:00", "action": "BUY" }
Monitor Signals & Orders
Check Signals Tab for all webhook signals
Orders will show up in Orders Tab
Active trades shown in Positions Tab
Daily results in Summary Tab
π Roadmap
Add authentication & user roles
Switch storage from JSON β MySQL
Full Upstox API integration (login + live market data + order placement)
Chart integration with live order overlays
Telegram/Email notifications
π οΈ Developer Notes
Default setup uses JSON file storage for easy local testing
For production:
Migrate storage to MySQL
Secure routes with authentication
Deploy on server (Apache/Nginx + PHP 8)
π License
MIT License β free to use and modify.