- Home
- Skills
- Mkalhitti Cloud
- Universal Or Strategy
- Trading Knowledge Vault
trading-knowledge-vault_skill
- C#
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill mkalhitti-cloud/universal-or-strategy --skill trading-knowledge-vault- SKILL.md10.7 KB
Overview
This skill is an automated lessons-learned vault for NinjaTrader trading code. It turns past incidents into enforced checkpoints so every code change must pass proven prevention protocols. Use it to avoid repeating costly bugs, ensure compliance, and embed trading patterns that worked.
How this skill works
The vault stores categorized lessons (critical bugs, trading setups, performance, compliance, architecture) with concrete prevention checklists. Before any code change or deployment, agents must consult the relevant vault entries, complete mandatory checks, and document deviations. The system enforces patterns like using tick-level market data, cancelling stranded orders, rate-limiting order modifications, and avoiding intermediary integrations.
When to use it
- Implementing new features in the strategy
- Fixing bugs discovered in live or simulated runs
- Performing pre-deployment code reviews
- Updating order management or connectivity code
- Adding new trading setups or performance optimizations
Best practices
- Always check Close[0] rules for real-time decisions; prefer OnMarketData and live price access when needed
- Cancel and clean up all related orders on fills and on strategy disable
- Enforce rate-limiting: track last modification time and allow >=1000ms between order mods
- Use bounded collections or fixed-size arrays and reuse StringBuilder instances to prevent memory growth
- Prefer direct, event-driven data connections; avoid intermediaries like Excel for live feeds
Example use cases
- Implementing a trailing stop: consult Close[0] checklist and use OnMarketData + GetLivePrice
- Fixing stranded orders: add OnOrderUpdate handling and a CleanupOrders routine that cancels working orders
- Integrating external signals: use TriggerCustomEvent to decouple command processing from market-data frequency
- Adding a new trading setup: document entry/stop/targets, add prevention checklist, and run tests before committing
- Hardening for compliance: implement real-time daily P&L tracking and auto-disable at limits
FAQ
Run the mandatory checklist: check Close[0], stranded orders, rate-limiting, memory management, connectivity, and Apex compliance items relevant to your change.
How do I add a new lesson to the vault?
Document the incident, add a prevention protocol and code pattern, update the mandatory checklist, test the prevention, and commit the change with clear notes.