How do I do this with NT8? when I delete an input control item, the NinjaScript generated code still contains the related variables.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to efficiently remove Properties
Collapse
X
-
How to efficiently remove Properties
with NT7 I could simply remove a Property group and the input control in the input control panel would be removed when the code was saved. I did not need to edit any of the NinjaScript generated code sections, it was updated on the save.
How do I do this with NT8? when I delete an input control item, the NinjaScript generated code still contains the related variables.Tags: None
-
Hello tulanch,Originally posted by tulanch View Postwith NT7 I could simply remove a Property group and the input control in the input control panel would be removed when the code was saved. I did not need to edit any of the NinjaScript generated code sections, it was updated on the save.
Thank you for your post.
This should be the same process in NinjaTrader 8. You may wish to create a new NinjaScript object and place the code (without the NinjaScript generated code) in the new file, delete the old file and compile.
Please let me know if you still have problems with the NinjaScript generated code.
-
I understand what you are saying, but I recall NT7 doing a different way as well.
I recall I could simply remove the definition from within the
#region Properties
area, save the code, and then recompile. NT7 would remove the required code from the
#region NinjaScript generated code. Neither change nor remove
area. This was the same for Plots and Lines.
It definitely does not work this way in NT8.
Comment
-
Yes, that is REALLY ANNOYING, eh!
There seems to be a bug in the way the auxiliary code is auto-generated, but it can be circumvented.
- Comment out the line containing NinjascriptProperty enclosed by brackets. A line like this:
Code:[Range(1, int.MaxValue), NinjaScriptProperty]
- Compile the script.
- Comment out the remaining lines of the property group, and any remaining usages of the unwanted variable elsewhere in the code.
- If the script compiles successfully you can now delete the commented lines.
Is there anyone who knows why this works? I don't, but it does.
Note: In NT7 there was a similar problem that only affected Enums.Last edited by Ricam; 02-14-2017, 02:20 PM.
Comment
- Comment out the line containing NinjascriptProperty enclosed by brackets. A line like this:
-
Hello tulanch and Ricam,
I agree, this should not be occurring at all. The behavior I see is akin to NinjaTrader 7.
Please advise what versions of NinjaTrader 8 are you running under Help > About?
In addition, do you have an example of this I may test on my end? You can export your indicator by going to Tools > Export > NinjaScript Add On > Add > select your indicator > OK > Export > name the file 'NTsupport' > Save.
The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your response.
I look forward to your response.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
581 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment