home / skills / mkalhitti-cloud / universal-or-strategy / nt8-log-monitor
/.agent/skills/nt8-log-monitor
This skill autonomously monitors NinjaTrader 8 logs and traces to detect errors and crashes, ensuring healthy deployments and quick issue detection.
npx playbooks add skill mkalhitti-cloud/universal-or-strategy --skill nt8-log-monitorReview the files below or copy the command above to add this skill to your agents.
---
name: nt8-log-monitor
description: Autonomous monitoring of NinjaTrader 8 logs and trace files for errors, rejections, and crashes.
---
# NinjaTrader 8 Log Monitor Skill
This skill allows Antigravity to autonomously verify the health of the NinjaTrader 8 environment by scanning system logs and trace files.
**Universal Path:** `${PROJECT_ROOT}`
**Executors:** ${BRAIN} (Reasoning), ${HANDS} (Gemini Flash via delegation_bridge)
## Related Skills
- [file-manager](../file-manager/SKILL.md) - File operations and deployment
- [delegation-bridge](../delegation-bridge/SKILL.md) - Safe deployment execution
- [wearable-project](../antigravity-core/wearable-project.md) - Portability standards
## Core Capabilities
1. **Identify Latest Logs**: Finds the most recent `.txt` log files and Rithmic/Brokerage trace files.
2. **Error Detection**: Scans for "Rejected", "Termination", "Error", and "Exception".
3. **Instrument Monitoring**: Scans specifically for events related to MES or MGC.
## When to Use
- **After Deployment**: Always run this skill after deploying a new version of the Master Strategy (`UniversalORStrategyV8_X`) to ensure it initialized without errors.
- **After Rejection**: If you suspect an order was rejected or a stop wasn't placed, use this skill to check the `log/` directory.
- **Connection Issues**: Check the `trace/` directory for Rithmic disconnects or timeout errors.
## Script Usage
### Find Latest Logs
```powershell
.agent\skills\nt8-log-monitor\scripts\Get-LatestLog.ps1
```
### Scan for Errors
```powershell
.agent\skills\nt8-log-monitor\scripts\Scan-LogsForErrors.ps1 -Keywords @("Rejected", "Error", "MGC")
```
## Protocol: Post-Deployment Health Check
After updating a strategy:
1. Run `Scan-LogsForErrors.ps1`.
2. Look for any `Termination` or `Error` logs timestamped within the last 5 minutes.
3. Report status to the user.
This skill autonomously monitors NinjaTrader 8 log and trace files to detect errors, rejections, and crashes affecting MES/MGC strategies. It locates the most recent logs and trace files, scans for key failure indicators, and highlights instrument-specific events. The goal is rapid health checks after deployments or when suspected order/connection issues occur.
The skill searches the project root for the latest .txt logs and brokerage/Rithmic trace files, then parses them for keywords like Rejected, Error, Exception, and Termination. It filters results for instrument identifiers (MES, MGC) and timestamps recent events to surface critical issues. Scripts are provided to automate finding latest logs and scanning for errors, and the skill can be invoked as part of a post-deployment health check.
Which files and folders does the skill inspect?
It targets the project root log/ and trace/ locations, locating recent .txt logs and brokerage/Rithmic trace files for analysis.
What keywords does the scanner look for by default?
Default keywords include Rejected, Error, Exception, and Termination; you can extend this list to include instrument tags like MES or MGC.
How quickly should I run this after deployment?
Run the scan within five minutes of deployment to catch startup or initialization errors that happen immediately after strategy load.