diff --git a/backend/app/services/backtest_engine.py b/backend/app/services/backtest_engine.py index 66ae04e..22942fe 100644 --- a/backend/app/services/backtest_engine.py +++ b/backend/app/services/backtest_engine.py @@ -70,7 +70,7 @@ def _precompute_indicators(candles: list[Candle], timeframe: str) -> dict: (see `_simulate_trades`). """ # MTF config - tf_minutes = {"15m": 15, "30m": 30, "1h": 60, "4h": 240} + tf_minutes = {"15m": 15, "30m": 30, "1h": 60, "4h": 240, "1d": 1440, "1w": 10080, "1M": 43200} main_minutes = tf_minutes.get(timeframe, 30) mtf_config = [] for mtf_tf, mtf_minutes, mtf_w in [("15m", 15, 0.5), ("1h", 60, 1.5), ("4h", 240, 2.0)]: diff --git a/backend/app/services/walk_forward.py b/backend/app/services/walk_forward.py index abc88ad..aecdd36 100644 --- a/backend/app/services/walk_forward.py +++ b/backend/app/services/walk_forward.py @@ -45,7 +45,7 @@ DEFAULT_PARAM_GRID: dict[str, list[float]] = { MIN_TRADES_PER_FOLD = 5 # reject param combos too sparse to trust WARMUP_BUFFER_CANDLES = 60 # extra history fetched before each window so indicators aren't cold at window start -_TF_MINUTES = {"15m": 15, "30m": 30, "1h": 60, "4h": 240, "1d": 1440} +_TF_MINUTES = {"15m": 15, "30m": 30, "1h": 60, "4h": 240, "1d": 1440, "1w": 10080, "1M": 43200} def _fold_score(closed_trades: list[dict], min_trades: int = MIN_TRADES_PER_FOLD) -> float: diff --git a/frontend/src/features/admin/AdminPage.tsx b/frontend/src/features/admin/AdminPage.tsx index 933c7a5..b6bd032 100755 --- a/frontend/src/features/admin/AdminPage.tsx +++ b/frontend/src/features/admin/AdminPage.tsx @@ -14,6 +14,7 @@ import { adminGetHealth, } from '../api/apiService'; import type { User, Exchange } from '../../types/trading'; +import { formatVNDateOnly } from '../../utils/dateTime'; interface HealthData { status: string; @@ -472,7 +473,7 @@ export default function AdminPage() { {u.is_active ? ● Active : ● Inactive} - {u.created_at ? new Date(u.created_at).toLocaleDateString() : '-'} + {formatVNDateOnly(u.created_at)}