export interface FuturesProduct {
  id: string;
  name: string;
  code: string;
  category: 'energy' | 'metal' | 'agriculture' | 'financial';
  price: number;
  change: number;
  changePercent: number;
  open: number;
  high: number;
  low: number;
  volume: number;
  openInterest: number;
  trendScore: number;
  successRate: number;
  cycles: {
    m5: TrendDirection;
    m15: TrendDirection;
    m30: TrendDirection;
    m60: TrendDirection;
  };
  keyLevels: {
    resistance: number[];
    support: number[];
  };
  recommendation: 'long' | 'short' | 'wait';
  recommendationReason: string;
}

export type TrendDirection = 'up' | 'down' | 'sideways';

export interface HotEvent {
  id: string;
  title: string;
  time: string;
  summary: string;
  affectedProducts: string[];
  impact: 'bullish' | 'bearish' | 'neutral';
  impactLevel: 1 | 2 | 3 | 4 | 5;
  analysis: string;
  risks: string[];
}

export interface MarketOverview {
  heatIndex: number;
  heatChange: number;
  upCount: number;
  downCount: number;
  capitalFlow: number;
  volatilityIndex: number;
  volatilityChange: number;
}

export interface KLineData {
  time: string;
  open: number;
  high: number;
  low: number;
  close: number;
  volume: number;
}

export interface MACDData {
  time: string;
  dif: number;
  dea: number;
  macd: number;
}

export interface TechnicalIndicators {
  macd: {
    signal: 'golden_cross' | 'dead_cross' | 'neutral';
    value: number;
  };
  rsi: {
    value: number;
    status: 'overbought' | 'oversold' | 'normal';
  };
  bollinger: {
    upper: number;
    middle: number;
    lower: number;
    position: 'upper' | 'middle' | 'lower';
  };
  kdj: {
    k: number;
    d: number;
    j: number;
    signal: 'golden_cross' | 'dead_cross' | 'neutral';
  };
}

export interface TradingAdvice {
  action: 'long' | 'short' | 'wait';
  entryPrice: number;
  stopLoss: number;
  targetPrice: number;
  riskLevel: 'low' | 'medium' | 'high';
  position: 'light' | 'medium' | 'heavy';
  holdingTime: 'short' | 'medium' | 'long';
  reason: string;
}

export interface RiskAlert {
  id: string;
  title: string;
  affectedProducts: string[];
  riskLevel: 'high' | 'medium' | 'low';
  description: string;
  suggestion: string;
  time: string;
}

export interface CycleAnalysis {
  period: 'm5' | 'm15' | 'm30' | 'm60';
  trend: TrendDirection;
  trendStrength: number;
  klineData: KLineData[];
  volumeData: { time: string; value: number }[];
  macdData: MACDData[];
  keyLevels: {
    resistance: number[];
    support: number[];
  };
}