obv 수정
This commit is contained in:
@@ -22,6 +22,7 @@ import { useIndicatorSettings } from '../../hooks/useIndicatorSettings';
|
||||
import { useSessionCandleOverlayControls } from '../../hooks/useSessionCandleOverlayControls';
|
||||
import { ensurePaperChartOverlays } from '../../utils/strategyToChartIndicators';
|
||||
import { mergeGlobalDefaultsOntoChartIndicators } from '../../utils/indicatorMainConfig';
|
||||
import { barsMeetObvVolumeRequirement } from '../../utils/obvChartBars';
|
||||
import { enrichIndicatorConfig } from '../../utils/indicatorRegistry';
|
||||
import {
|
||||
applyNotificationSignalMarkers,
|
||||
@@ -135,7 +136,10 @@ const TradeSignalMiniChart: React.FC<Props> = ({
|
||||
managerRef.current = mgr;
|
||||
syncToManager(mgr);
|
||||
applySignalMarkers();
|
||||
}, [syncToManager, applySignalMarkers]);
|
||||
if (needsDeepObv) {
|
||||
void mgr.repairDualLineSeries();
|
||||
}
|
||||
}, [syncToManager, applySignalMarkers, needsDeepObv]);
|
||||
|
||||
const applyRealtimeBar = useCallback((bar: OHLCVBar, append: boolean) => {
|
||||
if (barsMarketRef.current !== marketRef.current) return;
|
||||
@@ -185,7 +189,7 @@ const TradeSignalMiniChart: React.FC<Props> = ({
|
||||
const obvBarsReady = useMemo(() => {
|
||||
if (!needsDeepObv) return true;
|
||||
if (bars.length < 2) return false;
|
||||
return bars.some(b => (Number(b.volume) || 0) > 0);
|
||||
return barsMeetObvVolumeRequirement(bars);
|
||||
}, [needsDeepObv, bars]);
|
||||
|
||||
const chartDataReady = barsReady && obvBarsReady && settingsLoaded;
|
||||
|
||||
Reference in New Issue
Block a user