declare const FOREX_CAPITAL_SPLIT: {
    readonly poolReserves: 0.5;
    readonly tradingCapital: 0.5;
};
declare function computePoolAllocations(amount: number): {
    tradingCapital: number;
    totalPoolReserves: number;
    clearing: number;
    hedging: number;
    insurance: number;
};
interface ForexCycleOption {
    days: number;
    feeRate: number;
    commissionRate: number;
    label: string;
}
declare const FOREX_CYCLE_OPTIONS: ForexCycleOption[];
interface ForexCurrencyPair {
    id: string;
    base: string;
    quote: string;
    symbol: string;
    flag: string;
    name: string;
    basePrice: number;
    pipSize: number;
    spreadPips: number;
}
declare const FOREX_CURRENCY_PAIRS: ForexCurrencyPair[];
type ForexPoolType = 'clearing' | 'hedging' | 'insurance';
interface ForexPool {
    id: ForexPoolType;
    nameKey: string;
    descriptionKey: string;
    allocation: number;
    totalSize: number;
    utilization: number;
    color: string;
    apy7d: number;
    apy30d: number;
    netFlow24h: number;
    txCount24h: number;
    txCountTotal: number;
    totalDeposits: number;
    totalWithdrawals: number;
    profitDistributed: number;
    lastUpdated: number;
}
declare const FOREX_POOL_DEFAULTS: ForexPool[];
type ForexPoolTransactionType = 'deposit' | 'withdrawal' | 'profit_distribution' | 'loss_absorption' | 'inter_pool_transfer' | 'fee_collection' | 'reserve_rebalance';
interface ForexPoolTransaction {
    id: string;
    poolId: ForexPoolType;
    type: ForexPoolTransactionType;
    amount: number;
    balanceBefore: number;
    balanceAfter: number;
    txHash: string;
    blockNumber: number;
    timestamp: number;
    description: string;
}
interface ForexPoolDailySnapshot {
    poolId: ForexPoolType;
    date: string;
    openBalance: number;
    closeBalance: number;
    deposits: number;
    withdrawals: number;
    netFlow: number;
    dailyPnl: number;
    dailyPnlPct: number;
    cumulativePnl: number;
    utilization: number;
    txCount: number;
    activeUsers: number;
}
interface ForexPosition {
    id: string;
    pairId: string;
    side: 'BUY' | 'SELL';
    lots: number;
    pips: number;
    entryPrice: number;
    currentPrice: number;
    pnl: number;
    openTime: number;
}
interface ForexInvestment {
    id: string;
    userId?: string;
    amount: number;
    currentValue: number;
    profit: number;
    status: 'active' | 'completed' | 'pending' | 'redeemed' | 'cancelled';
    selectedPairs: string[];
    cycleDays: number;
    cycleOption: ForexCycleOption;
    feeRate?: number;
    commissionRate?: number;
    startDate: string;
    endDate: string;
    tradingCapital: number;
    totalPoolReserves: number;
    poolAllocations: {
        clearing: number;
        hedging: number;
        insurance: number;
    };
    tradeWeight: number;
    totalLots: number;
    totalPips: number;
    totalTrades: number;
    positions: ForexPosition[];
    tradeHistory: ForexTradeRecord[];
    redeemedAt?: string;
    createdAt?: string;
    updatedAt?: string;
}
type ForexTradeStatus = 'RFQ' | 'QUOTED' | 'MATCHED' | 'SETTLED' | 'FAILED';
interface ForexTradeRecord {
    id: string;
    timestamp: number;
    pairId: string;
    pairSymbol: string;
    side: 'BUY' | 'SELL';
    rfqPrice: number;
    quotePrice: number;
    matchPrice: number;
    settlePrice: number;
    lots: number;
    pips: number;
    pnl: number;
    status: ForexTradeStatus;
    pvpSettled: boolean;
    clearingFee?: number;
    hedgingCost?: number;
    insuranceReserve?: number;
    txHash?: string;
    blockNumber?: number;
    cycleDay?: number;
    cumulativePnl?: number;
}
type ForexLogType = 'RFQ' | 'QUOTE' | 'MATCH' | 'SETTLE' | 'PVP' | 'HEDGE' | 'CLEAR' | 'POSITION' | 'PNL' | 'SYSTEM';
interface ForexLogEntry {
    id: string;
    timestamp: number;
    type: ForexLogType;
    message: string;
    data?: Record<string, any>;
    importance: 'low' | 'medium' | 'high';
    pairId?: string;
}
interface ForexAgent {
    id: string;
    nameKey: string;
    descriptionKey: string;
    icon: string;
    color: string;
    supportedPairs: string[];
    dailyRoiMin: number;
    dailyRoiMax: number;
    totalManaged: number;
    totalUsers: number;
    winRate: number;
}
declare const FOREX_AGENT: ForexAgent;
declare function calculateForexNetProfit(grossProfit: number, cycleOption: ForexCycleOption): {
    feeAmount: number;
    postFeeProfit: number;
    netProfit: number;
};
declare function estimateForexProfit(amount: number, cycleDays: number, agent?: ForexAgent): {
    grossProfit: number;
    feeAmount: number;
    netProfit: number;
    dailyRate: number;
};

type BotLogType = 'SCAN' | 'INDICATOR' | 'NEWS' | 'SIGNAL' | 'ANALYSIS' | 'DECISION' | 'ORDER' | 'FILLED' | 'PNL' | 'RISK' | 'SYSTEM' | 'STRATEGY' | 'THINKING';
interface BotLogEntry {
    id: string;
    timestamp: number;
    strategyId: string;
    strategyName: string;
    type: BotLogType;
    message: string;
    data?: Record<string, any>;
    importance: 'low' | 'medium' | 'high';
}
interface IndicatorSnapshot {
    rsi: number;
    macd: {
        value: number;
        signal: number;
        histogram: number;
    };
    ema: {
        short: number;
        long: number;
        crossover: 'golden' | 'death' | 'none';
    };
    bollinger: {
        upper: number;
        middle: number;
        lower: number;
        width: number;
        position: number;
    };
    volume: {
        current: number;
        average: number;
        ratio: number;
    };
}
interface BotState {
    strategyId: string;
    strategyName: string;
    isRunning: boolean;
    currentPair: string;
    currentPrice: number;
    indicators: IndicatorSnapshot;
    openPositions: OpenPosition[];
    totalPnl: number;
    totalTrades: number;
    winRate: number;
    lastSignal: string;
    lastSignalConfidence: number;
}
interface OpenPosition {
    id: string;
    pair: string;
    side: 'LONG' | 'SHORT';
    entryPrice: number;
    currentPrice: number;
    size: number;
    leverage: number;
    pnl: number;
    pnlPercent: number;
}
interface StrategyPersonality {
    id: string;
    name: string;
    shortName: string;
    color: string;
    scanIntervalMin: number;
    scanIntervalMax: number;
    tradeFrequency: number;
    positionSizeMin: number;
    positionSizeMax: number;
    leverageMin: number;
    leverageMax: number;
    primaryIndicators: string[];
    riskTolerance: 'low' | 'medium' | 'high';
    preferredPairs: string[];
    rsiBias: number;
    tier: InvestmentTier;
    dailyYieldMin: number;
    dailyYieldMax: number;
    description: string;
    category: StrategyCategory;
}
type StrategyCategory = 'conservative' | 'balanced' | 'growth' | 'aggressive' | 'quantitative';
type InvestmentTier = 'starter' | 'basic' | 'standard' | 'premium' | 'elite' | 'vip';
interface TierConfig {
    id: InvestmentTier;
    name: string;
    nameCn: string;
    minInvestment: number;
    maxInvestment: number;
    color: string;
    icon: string;
}
declare const INVESTMENT_TIERS: Record<InvestmentTier, TierConfig>;
interface CycleConfig {
    id: string;
    days: number;
    name: string;
    nameCn: string;
    profitSharePercent: number;
    bonusMultiplier: number;
    earlyWithdrawPenalty: number;
}
declare const INVESTMENT_CYCLES: CycleConfig[];
type LogCallback = (entry: BotLogEntry) => void;
declare const STRATEGY_PERSONALITIES: StrategyPersonality[];
declare class BotSimulationEngine {
    private listeners;
    private botTimers;
    private botStates;
    private priceState;
    private indicatorState;
    private running;
    private userPairs;
    private userChains;
    constructor();
    getStrategies(): StrategyPersonality[];
    start(strategyIds?: string[], userPairs?: string[], userChains?: string[]): void;
    stop(strategyIds?: string[]): void;
    onLog(callback: LogCallback): () => void;
    getBotState(strategyId: string): BotState | undefined;
    getAllBotStates(): Map<string, BotState>;
    isRunning(): boolean;
    emitBootSequence(): void;
    destroy(): void;
    private emit;
    private getActivePairs;
    private getActiveChain;
    private getChainLabel;
    private initBotState;
    private scheduleCycle;
    private runBotCycle;
    private simulatePrice;
    private generateIndicators;
    private generateThinkingProcess;
    private generateStrategyContext;
    private generateAnalysis;
    private evaluateSignal;
    private makeTradeDecision;
}
declare const botSimulationEngine: BotSimulationEngine;

type AILogType = 'SCAN' | 'THINKING' | 'INDICATOR' | 'ANALYSIS' | 'SIGNAL' | 'STRATEGY' | 'DECISION' | 'ORDER' | 'FILLED' | 'PNL' | 'RISK' | 'NEWS' | 'SYSTEM';
declare const AI_LOG_COLORS: Record<AILogType, string>;
declare const FOREX_LOG_COLORS: Record<ForexLogType, string>;
type PositionSide = 'LONG' | 'SHORT';
type PositionStatus = 'open' | 'closed' | 'liquidated' | 'pending';
interface AIPosition {
    id: string;
    strategyId: string;
    strategyName: string;
    pair: string;
    side: PositionSide;
    entryPrice: number;
    currentPrice: number;
    size: number;
    leverage: number;
    margin: number;
    pnl: number;
    pnlPercent: number;
    status: PositionStatus;
    stopLoss?: number;
    takeProfit?: number;
    liquidationPrice?: number;
    openTime: number;
    closeTime?: number;
    chain?: string;
    orderId?: string;
    aiConfidence?: number;
    aiReasoning?: string;
}
type DecisionAction = 'OPEN_LONG' | 'OPEN_SHORT' | 'CLOSE_LONG' | 'CLOSE_SHORT' | 'HOLD' | 'SKIP';
interface AIDecision {
    id: string;
    timestamp: number;
    strategyId: string;
    strategyName: string;
    pair: string;
    action: DecisionAction;
    confidence: number;
    reasoning: string;
    indicators: {
        rsi?: number;
        macd?: number;
        ema?: string;
        volume?: number;
        bollinger?: string;
    };
    signals: string[];
    executed: boolean;
    positionId?: string;
    price?: number;
    size?: number;
    leverage?: number;
}
type RiskLevel = 'low' | 'medium' | 'high' | 'critical';
type TradingStatus = 'active' | 'paused' | 'stopped' | 'cooldown';
interface RiskStatus {
    timestamp: number;
    totalExposure: number;
    maxExposure: number;
    exposurePercent: number;
    dailyPnl: number;
    dailyPnlLimit: number;
    dailyPnlPercent: number;
    dailyTradeCount: number;
    dailyTradeLimit: number;
    currentDrawdown: number;
    maxDrawdown: number;
    drawdownPercent: number;
    openPositions: number;
    maxPositions: number;
    riskLevel: RiskLevel;
    tradingStatus: TradingStatus;
    warnings: string[];
    strategyRisks?: Record<string, {
        exposure: number;
        drawdown: number;
        riskLevel: RiskLevel;
    }>;
}
declare const RISK_LEVEL_COLORS: Record<RiskLevel, {
    color: string;
    bgColor: string;
}>;
declare const TRADING_STATUS_COLORS: Record<TradingStatus, {
    color: string;
    bgColor: string;
}>;
interface ConsoleMetrics {
    nav: number;
    navChange24h: number;
    navChangePercent24h: number;
    totalPnl: number;
    realizedPnl: number;
    unrealizedPnl: number;
    pnlToday: number;
    pnl7d: number;
    pnl30d: number;
    totalTrades: number;
    tradesToday: number;
    winRate: number;
    winCount: number;
    lossCount: number;
    avgWin: number;
    avgLoss: number;
    profitFactor: number;
    openPositions: number;
    totalExposure: number;
    avgLeverage: number;
    strategyMetrics?: Record<string, {
        pnl: number;
        trades: number;
        winRate: number;
        exposure: number;
    }>;
}
type AgentStatus = 'active' | 'paused' | 'idle' | 'error' | 'initializing';
interface AIAgent {
    id: string;
    strategyId: string;
    name: string;
    shortName: string;
    color: string;
    status: AgentStatus;
    totalPnl: number;
    pnlToday: number;
    winRate: number;
    totalTrades: number;
    tradesToday: number;
    currentPair?: string;
    currentPrice?: number;
    lastSignal?: string;
    lastSignalConfidence?: number;
    lastActivity?: number;
    openPositions: number;
    totalExposure: number;
    riskLevel: RiskLevel;
    drawdown: number;
    riskTolerance: 'low' | 'medium' | 'high';
    primaryIndicators: string[];
    preferredPairs: string[];
    leverageRange: [number, number];
}
declare const AGENT_STATUS_COLORS: Record<AgentStatus, {
    color: string;
    bgColor: string;
    label: string;
}>;
interface CombinedLogEntry {
    id: string;
    timestamp: number;
    source: 'ai' | 'forex';
    strategyId?: string;
    strategyName?: string;
    type: string;
    message: string;
    data?: Record<string, any>;
    importance: 'low' | 'medium' | 'high';
}
interface TradingConsoleState {
    ai: {
        strategies: StrategyPersonality[];
        agents: AIAgent[];
        positions: AIPosition[];
        decisions: AIDecision[];
        riskStatus: RiskStatus | null;
        simulationLogs: BotLogEntry[];
        botStates: Map<string, BotState>;
    };
    forex: {
        logs: ForexLogEntry[];
        poolTransactions: ForexPoolTransaction[];
        stats: {
            totalPnl: number;
            totalTrades: number;
            totalPips: number;
            totalLots: number;
        };
    };
    metrics: ConsoleMetrics;
    combinedLogs: CombinedLogEntry[];
}
interface TradingConsoleOptions {
    simulation?: boolean;
    pollInterval?: number;
    maxLogs?: number;
    strategyIds?: string[];
    autoStart?: boolean;
}
interface AIQuantConsoleOptions {
    strategyIds?: string[];
    pollInterval?: number;
    simulation?: boolean;
    maxLogs?: number;
}
interface AgentConsoleOptions {
    strategyId: string;
    pollInterval?: number;
    simulation?: boolean;
    maxLogs?: number;
}
declare const DEFAULT_CONSOLE_OPTIONS: TradingConsoleOptions;
declare const DEFAULT_RISK_STATUS: RiskStatus;
declare const DEFAULT_CONSOLE_METRICS: ConsoleMetrics;
declare function calculateRiskLevel(exposurePercent: number, drawdownPercent: number, dailyPnlPercent: number): RiskLevel;
declare function formatPnl(pnl: number): string;
declare function formatPercent(value: number, showSign?: boolean): string;

export { STRATEGY_PERSONALITIES as $, type AILogType as A, type BotLogType as B, type PositionStatus as C, type AIPosition as D, type DecisionAction as E, FOREX_CAPITAL_SPLIT as F, type AIDecision as G, RISK_LEVEL_COLORS as H, type IndicatorSnapshot as I, TRADING_STATUS_COLORS as J, type ConsoleMetrics as K, type AgentStatus as L, AGENT_STATUS_COLORS as M, type CombinedLogEntry as N, type TradingConsoleState as O, type PositionSide as P, type TradingConsoleOptions as Q, type RiskStatus as R, type StrategyPersonality as S, type TradingStatus as T, type AIQuantConsoleOptions as U, type AgentConsoleOptions as V, DEFAULT_CONSOLE_OPTIONS as W, DEFAULT_RISK_STATUS as X, DEFAULT_CONSOLE_METRICS as Y, calculateRiskLevel as Z, formatPnl as _, type BotLogEntry as a, INVESTMENT_TIERS as a0, INVESTMENT_CYCLES as a1, type InvestmentTier as a2, type CycleConfig as a3, type TierConfig as a4, formatPercent as a5, type AIAgent as a6, type RiskLevel as a7, botSimulationEngine as b, type BotState as c, computePoolAllocations as d, type ForexCycleOption as e, FOREX_CYCLE_OPTIONS as f, type ForexCurrencyPair as g, FOREX_CURRENCY_PAIRS as h, type ForexPoolType as i, type ForexPool as j, FOREX_POOL_DEFAULTS as k, type ForexPoolTransactionType as l, type ForexPoolTransaction as m, type ForexPoolDailySnapshot as n, type ForexPosition as o, type ForexInvestment as p, type ForexTradeStatus as q, type ForexTradeRecord as r, type ForexLogType as s, type ForexLogEntry as t, type ForexAgent as u, FOREX_AGENT as v, calculateForexNetProfit as w, estimateForexProfit as x, AI_LOG_COLORS as y, FOREX_LOG_COLORS as z };
