Skip to content

This project is a web-based algo trading platform built in PHP to connect TradingView alerts with the Upstox API.

Notifications You must be signed in to change notification settings

doulatdutta/algoR1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ 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:

http://localhost/algo/public/

πŸ”‘ 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.

About

This project is a web-based algo trading platform built in PHP to connect TradingView alerts with the Upstox API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published