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
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
-
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 proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
4 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
309 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment