가상매매 시간봉 제거
This commit is contained in:
@@ -5,8 +5,7 @@ import type { VirtualIndicatorSnapshot } from '../../hooks/useVirtualIndicatorSn
|
||||
import { useLiveReceiveFlash } from '../../hooks/useLiveReceiveFlash';
|
||||
import type { ChartRealtimeSource } from '../../hooks/useChartRealtimeData';
|
||||
import { buildConditionMetrics } from '../../utils/virtualSignalMetrics';
|
||||
import { candleTypeToTimeframe } from '../../utils/strategyToChartIndicators';
|
||||
import { normalizeStartCandleType } from '../../utils/strategyStartNodes';
|
||||
import { resolveStrategyPrimaryTimeframe } from '../../utils/strategyToChartIndicators';
|
||||
import type { Timeframe } from '../../types';
|
||||
import VirtualLiveBadge from './VirtualLiveBadge';
|
||||
import type { VirtualLiveStatus } from '../../hooks/useVirtualTargetLiveStatus';
|
||||
@@ -27,9 +26,8 @@ interface Props {
|
||||
strategyId: number | null;
|
||||
globalStrategyId: number | null;
|
||||
onStrategyChange?: (strategyId: number | null) => void;
|
||||
candleType: string;
|
||||
onCandleTypeChange?: (candleType: string) => void;
|
||||
snapshot: VirtualIndicatorSnapshot | undefined;
|
||||
signalLoading?: boolean;
|
||||
running: boolean;
|
||||
liveStatus?: VirtualLiveStatus;
|
||||
lastTickAt?: number;
|
||||
@@ -54,9 +52,8 @@ const VirtualTargetCard: React.FC<Props> = ({
|
||||
strategyId,
|
||||
globalStrategyId,
|
||||
onStrategyChange,
|
||||
candleType,
|
||||
onCandleTypeChange,
|
||||
snapshot,
|
||||
signalLoading = false,
|
||||
running,
|
||||
liveStatus = 'idle',
|
||||
lastTickAt,
|
||||
@@ -83,8 +80,10 @@ const VirtualTargetCard: React.FC<Props> = ({
|
||||
|
||||
const isDetail = viewMode === 'detail';
|
||||
const isChart = displayMode === 'chart';
|
||||
const evalCandleType = normalizeStartCandleType(candleType);
|
||||
const chartTimeframe = candleTypeToTimeframe(evalCandleType) as Timeframe;
|
||||
const chartTimeframe = useMemo(
|
||||
() => resolveStrategyPrimaryTimeframe(strategy) as Timeframe,
|
||||
[strategy],
|
||||
);
|
||||
|
||||
const receiveSignal = useMemo(() => {
|
||||
if (!running) return null;
|
||||
@@ -184,6 +183,7 @@ const VirtualTargetCard: React.FC<Props> = ({
|
||||
snapshot={snapshot}
|
||||
viewMode={viewMode}
|
||||
receiving={highlightReceiving}
|
||||
loading={signalLoading}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -192,9 +192,7 @@ const VirtualTargetCard: React.FC<Props> = ({
|
||||
strategies={strategies}
|
||||
strategyId={strategyId}
|
||||
globalStrategyId={globalStrategyId}
|
||||
candleType={evalCandleType}
|
||||
onStrategyChange={onStrategyChange}
|
||||
onCandleTypeChange={onCandleTypeChange}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user