From 92004ed34ea175f45228cc861c8d1977cabccc7a Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 12 Jul 2022 18:11:26 +0800 Subject: [PATCH] fix selectOrders filter --- apps/backtest-report/components/TradingViewChart.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/backtest-report/components/TradingViewChart.tsx b/apps/backtest-report/components/TradingViewChart.tsx index 6d121aae1..f50535e62 100644 --- a/apps/backtest-report/components/TradingViewChart.tsx +++ b/apps/backtest-report/components/TradingViewChart.tsx @@ -145,7 +145,7 @@ const selectOrders = (data: Order[], since: Date, until: Date): Order[] => { continue } - data.push(d); + entries.push(d); } return entries } @@ -448,8 +448,7 @@ const TradingViewChart = (props: TradingViewChartProps) => { const fetchers = []; const ordersFetcher = fetchOrders(props.basePath, props.runID).then((orders: Order[] | void) => { if (orders) { - // const markers = ordersToMarkers(currentInterval, selectOrders(orders, selectedTimeRange[0], selectedTimeRange[1])); - const markers = ordersToMarkers(currentInterval, orders); + const markers = ordersToMarkers(currentInterval, selectOrders(orders, selectedTimeRange[0], selectedTimeRange[1])); chartData.orders = orders; chartData.markers = markers; setOrders(orders);