CREATE TABLE IF NOT EXISTS signals (
    id INT AUTO_INCREMENT PRIMARY KEY,
    symbol VARCHAR(50) NOT NULL,
    timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
    spot_price DECIMAL(15, 2),
    pcr DECIMAL(10, 4),
    smi INT,
    analysis_text TEXT,
    signal_type VARCHAR(50),
    entry DECIMAL(15, 2),
    t1 DECIMAL(15, 2),
    t2 DECIMAL(15, 2),
    sl DECIMAL(15, 2),
    INDEX idx_symbol_timestamp (symbol, timestamp DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
