How can I work around this?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Exporting problem
Collapse
X
-
Exporting problem
I just discovered the very handy 'UserDefinedMethods' Strategy and have been merrily populating it with all the handy utility methods that are common to my different strategies. But now when I try to export my strategies, the Export dialog says 'Error compiling export sources. Please check your logs.' In the logs, I have a long error saying something like "CS0103: the name 'myMethod' does not exist in the current context".
How can I work around this?Tags: None
-
The only thing you can do is move the method referenced from the NinjaScript export file to the actual file you are exporting.
The problem is that we can't allow exporting of the UserDefinedMethods since doing so would mean that on import, it would overwrite the target PC's UserDefinedMethods.cs and cause someone some grief if they lost data in this file due to it being overwritten.
In a nuthshell, UserDefinedMethods is good way to share common methods among your own NinjaScript objects in the scope of your own PC.RayNinjaTrader Customer Service
-
Hey Ray,
So from what it sounds like, the Export function is meant for taking one strategy and sharing it. What I really want to to is export the CS file so that I can store it in version control. This is something I'll be doing on a roughly daily basis so doing a big copy-n-paste each time would defeat the purpose. Do you know any way that I can select my strategies and get them into the real world?
(I've already tried inspecting the NinjaTrader.mdb file in the hopes of finding where the strategies are defined, but no luck.)
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
576 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment