<?php

class TradeLogger
{
    public static function log($pdo, $plan, $symbol)
    {
        $stmt = $pdo->prepare("
            INSERT INTO trades (symbol, direction, entry, stop_loss, take_profit, rr)
            VALUES (?, ?, ?, ?, ?, ?)
        ");

        $stmt->execute([
            $symbol,
            $plan['direction'],
            $plan['entry_price'],
            $plan['stop_loss'],
            $plan['take_profit'],
            $plan['rr']
        ]);
    }
}