No description
- JavaScript 63%
- CSS 21.1%
- EJS 15.9%
| public | ||
| views | ||
| .gitignore | ||
| analyzer.log | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| server.js | ||
| TRADING_PLAYBOOK.md | ||
Sigma-Visualizer
Web-based visualization dashboard for Sigma stock analysis data.
Smart Investment Guidance & Market Analysis
Features
- Real-time Dashboard: Dark-themed, responsive interface
- Stock Table: Sortable multi-column table with all analyzed stocks
- Detailed Analysis: Interactive charts, entry points, and technical indicators
- Live Console: Real-time application logs
- PDF Export: Export individual stock analysis reports
- Eastern Time Clock: Live market time display
Prerequisites
- Node.js (v16 or higher)
stocks.dbdatabase file from sigma-analyzer
Installation
- Install dependencies:
npm install
-
Ensure
stocks.dbexists in the parent directory (from sigma-analyzer) -
Start the server:
npm start
- Access the dashboard:
http://localhost:3000
Project Structure
sigma-visualizer/
├── server.js # Express server and API endpoints
├── views/
│ └── index.ejs # Main HTML template
├── public/
│ ├── css/
│ │ └── styles.css # Dark theme styling
│ └── js/
│ └── app.js # Frontend JavaScript
└── package.json
API Endpoints
GET /- Main dashboard pageGET /api/stocks- Retrieve all stocks dataGET /api/stock/:ticker- Get detailed stock analysisGET /api/time- Get current Eastern TimePOST /api/export-pdf/:ticker- Export stock analysis as PDF
Features in Detail
Container 1: Header
- Application title and branding
- Live Eastern Time clock
Container 2: Console
- Real-time application logs
- Collapsible view
- Auto-scrolling log history
Container 3: Stock Table
- Sortable columns (multi-sort support)
- Click rows to view details
- Displays: Ticker, Exchange, Price, 8-EMA, Support Levels
Container 4: Stock Details
Shows when a stock is selected:
Charts:
- Price Action with Support/Resistance markers (90 days)
- EMA Analysis (8-EMA and 20-EMA)
Metrics:
- Current Price
- Primary Entry Point
- Secondary Entry Point
Stop Loss Levels:
- Conservative (with risk %)
- Moderate (with risk %)
- Aggressive (with risk %)
Additional Data:
- Analysis Insights (trend, EMAs, market cap)
- Average Retracement Depth
- Support Levels (top 5)
- Fibonacci Retracements
Actions:
- Export PDF
- Close Details
Multi-Column Sorting
The stock table supports multiple sort columns:
- Click a column header to sort ascending
- Click again to sort descending
- Click a third time to remove sort
- Sort indicators show order and direction (e.g., ↑1, ↓2)
Docker Deployment
For deployment with sigma-analyzer in a Docker stack:
- Create a
docker-compose.ymlin the parent directory - Configure both services to share the
stocks.dbfile - Use a shared volume for database access
Example docker-compose.yml structure:
version: '3.8'
services:
sigma-analyzer:
# analyzer configuration
sigma-visualizer:
# visualizer configuration
volumes:
- ./data:/app/data # shared volume
Responsive Design
- Desktop: Full multi-column layout
- Tablet: Stacked chart layout
- Mobile: Single-column, optimized for touch
Technology Stack
- Backend: Node.js, Express
- Database: SQLite (via sql.js)
- Frontend: Vanilla JavaScript, Chart.js
- Styling: Custom CSS with dark theme
- Templating: EJS
Notes
- Database reloads automatically on each API call to show latest data
- Charts update dynamically when stock details are loaded
- Console maintains last 100 log entries
- Auto-refresh every 60 seconds
Development
For development with auto-reload, consider using nodemon:
npm install -g nodemon
nodemon server.js
Troubleshooting
Database not found:
- Ensure
stocks.dbexists in../stocks.dbrelative to sigma-visualizer - Run sigma-analyzer first to generate the database
Port already in use:
- Change PORT in
server.js(default: 3000)
Charts not displaying:
- Check browser console for Chart.js errors
- Ensure daily_data table has records for the selected stock