using NT8.Core.Common.Models;
using NT8.Core.Logging;
using System.Collections.Generic;

namespace NT8.Core.Common.Interfaces
{
    /// <summary>
    /// Core strategy interface - strategies implement signal generation only
    /// The SDK handles all risk management, position sizing, and order execution
    /// </summary>
    public interface IStrategy
    {
        /// <summary>
        /// Strategy metadata and configuration
        /// </summary>
        StrategyMetadata Metadata { get; }

        /// <summary>
        /// Initialize strategy with configuration and dependencies
        /// </summary>
        void Initialize(StrategyConfig config, IMarketDataProvider dataProvider, ILogger logger);

        /// <summary>
        /// Process new bar data and generate trading intent (if any)
        /// This is the main entry point for strategy logic
        /// </summary>
        StrategyIntent OnBar(BarData bar, StrategyContext context);

        /// <summary>
        /// Process tick data for high-frequency strategies (optional)
        /// Most strategies can leave this as default implementation
        /// </summary>
        StrategyIntent OnTick(TickData tick, StrategyContext context);

        /// <summary>
        /// Get current strategy parameters for serialization
        /// </summary>
        Dictionary<string, object> GetParameters();

        /// <summary>
        /// Update strategy parameters from configuration
        /// </summary>
        void SetParameters(Dictionary<string, object> parameters);
    }
}