[GAP-055]: MaxDailyTrades persistence complete
- SimpleORBStrategy.cs: persist and rehydrate daily trade count by trading date - NT8StrategyBase.cs: pass live account/log metadata for persistence - SimpleORBNT8.cs: seed persistence metadata in strategy config - MaxDailyTradesTests.cs: cover restore, reset, corrupt file, backtest no-I/O, CME date - docs/00-governance: record validation evidence and manual SIM follow-up Build: clean | Tests: 521 passing; Core 432 passing | Deploy: backup 20260823_143311
This commit is contained in:
@@ -1,5 +1,26 @@
|
||||
# Current Status — NT8 SDK
|
||||
**Last Updated:** 2026-08-23 (GAP-048 reject taxonomy implemented and deployed)
|
||||
**Last Updated:** 2026-08-23 (GAP-055 MaxDailyTrades persistence implemented and deployed)
|
||||
|
||||
---
|
||||
|
||||
## 2026-08-23 — GAP-055 IMPLEMENTED, manual NT8/SIM restart validation pending
|
||||
|
||||
Kilocode executed `TASK_GAP055_MAXDAILYTRADES_PERSIST_PROMPT.md`. `MaxDailyTrades` now persists across live/SIM strategy restarts by writing `{LogDirectory}\daily_trade_count_<AccountName>_<StrategyName>.json` after each daily-count increment and rehydrating once per trading date on the first realtime-eligible bar after session reset.
|
||||
|
||||
Implementation notes:
|
||||
- Persistence is opt-in from the NT8 adapter and enabled only when `Account != null`.
|
||||
- Strategy Analyzer/backtest paths with `Account == null` do not read or write the file.
|
||||
- Trading date follows the adapter/session date already used by `BuildSessionInfo()` / `MarketSession.SessionStart`, so the 2026-08-16 19:12 ET and 2026-08-17 11:04 ET sessions both resolve to trading date 2026-08-17.
|
||||
- Missing/corrupt/unreadable files start at zero, log a warning, and do not throw.
|
||||
- File key is account + strategy name as specified; `symbol` is stored in the payload, and multiple same-account/same-strategy instances share the same counter by design for this task.
|
||||
|
||||
Evidence:
|
||||
- Added tests for same-date restore, new-date reset/overwrite, corrupt-file warning/no throw, `Account == null` no-read/no-write behavior, and the 2026-08-16 evening / 2026-08-17 morning same-CME-date scenario.
|
||||
- `verify-build.bat`: passed, 521/521 tests.
|
||||
- `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal`: passed, 432/432.
|
||||
- `deployment\deploy-to-nt8.bat`: completed; backup `deployment\backups\20260823_143311`; `NinjaTrader.Custom.dll` was not present to invalidate.
|
||||
|
||||
Next required action: manual NinjaScript compile after starting NinjaTrader, then SIM validation by taking one trade, stopping/restarting the strategy on the same trading day, and confirming the next signal is rejected with `REJECT: reason=MaxDailyTrades`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user