Many traders using NinjaTrader already have Strategies they have built, purchased or modified over time. The problem is often not creating another Strategy from scratch, but safely improving the code they already have. This is an area where AI can be particularly useful.
An existing NinjaScript Strategy can be reviewed to understand its entry, exit and risk-management logic before any changes are made. From there, AI can help repair problems, add new features or merge functionality from another Strategy.
We recently improved the existing-code workflow in Xen AI for NinjaTrader to make this type of development easier.
Instead of relying on source code buried inside a long AI conversation, the Strategy is attached as the project's current source. Other NinjaScript files can then be added either for integration or simply as reference code.
For example, you could have:
A sensible workflow is:
Review → Clarify → Modify → Build Check → Compile → Test
When Xen produces a complete revised Strategy, the latest working version can then become the basis for the next modification. This does not remove the need for testing. AI-generated or modified NinjaScript should always be compiled in NinjaTrader and its actual trading behaviour verified before use.
I recorded a short demonstration of the updated workflow:
Video:
Xen AI for NinjaTrader:
https://ninja.clickalgo.com/
For traders who already have working NinjaScript, I think improving existing code is ultimately one of the more practical applications of AI coding.
An existing NinjaScript Strategy can be reviewed to understand its entry, exit and risk-management logic before any changes are made. From there, AI can help repair problems, add new features or merge functionality from another Strategy.
We recently improved the existing-code workflow in Xen AI for NinjaTrader to make this type of development easier.
Instead of relying on source code buried inside a long AI conversation, the Strategy is attached as the project's current source. Other NinjaScript files can then be added either for integration or simply as reference code.
For example, you could have:
- Your main Strategy as the current source
- A second Strategy containing a trailing-stop system you want to integrate
- Another NinjaScript file provided only as an implementation reference
A sensible workflow is:
Review → Clarify → Modify → Build Check → Compile → Test
When Xen produces a complete revised Strategy, the latest working version can then become the basis for the next modification. This does not remove the need for testing. AI-generated or modified NinjaScript should always be compiled in NinjaTrader and its actual trading behaviour verified before use.
I recorded a short demonstration of the updated workflow:
Video:
Xen AI for NinjaTrader:
https://ninja.clickalgo.com/
For traders who already have working NinjaScript, I think improving existing code is ultimately one of the more practical applications of AI coding.