CREATE TABLE IF NOT EXISTS trades (
    id INT AUTO_INCREMENT PRIMARY KEY,
    symbol VARCHAR(20) NOT NULL,
    type VARCHAR(50) NOT NULL, -- BUY/SELL/STRONG_BULLISH etc
    contract VARCHAR(50) NOT NULL,
    entry_price DECIMAL(15, 2) NOT NULL,
    exit_price DECIMAL(15, 2) DEFAULT NULL,
    t1 DECIMAL(15, 2) NOT NULL,
    t2 DECIMAL(15, 2) NOT NULL,
    sl DECIMAL(15, 2) NOT NULL,
    status VARCHAR(20) DEFAULT 'OPEN', -- OPEN, CLOSED
    result VARCHAR(10) DEFAULT NULL, -- WIN, LOSS
    timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    closed_at TIMESTAMP NULL DEFAULT NULL
);
