Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NT8 - editor does not support new when running nswrappers script
Collapse
X
-
NT8 - editor does not support new when running nswrappers script
NT8 - editor does not support new when running nswrappers script
Tags: None
-
a) no one is editing NS WRAPPERS !!!! LOL!!!!Originally posted by NinjaTrader_Dierk View PostI'm not sure
a) why you manually edit the wrappers,which you never should do anyway
b) which C# language syntax would allow you doing what you're trying to do
ok the problem is this...
b)here is info for you about the "New" keyword
Use the new and override keywords in C# to specify how methods with the same name in a base and derived class interact.
the "NEW" keyword is not understood by the macro and it then creates a broken Wrapper
i provided a demo to show you the macro doesnt understand it...
can you understand that or do you want a video of it?
i realize its hard to understand unless you are at my desk wathcing :-)
Comment
-
certainlyOriginally posted by NinjaTrader_Dierk View PostCould you pls provide steps which would generate that wrapper code? Thanks
Open for Edit any indicator - Bollinger for example
change the following property from
toCode:[Range(0, int.MaxValue), NinjaScriptProperty] [Display(ResourceType = typeof(Custom.Resource), Name = "NumStdDev", GroupName = "NinjaScriptParameters", Order = 0)] public double NumStdDev { get; set; }
save the file as a copyCode:[Range(0, int.MaxValue), NinjaScriptProperty] [Display(ResourceType = typeof(Custom.Resource), Name = "NumStdDev", GroupName = "NinjaScriptParameters", Order = 0)] public new double NumStdDev { get; set; }
compile
wait for error in NSWrapper generation
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
yes i realise in this case the change is superflous but it demonstrates the editor limitaion when the usage is used to try to prevent the recursion warning.. .when using a property to wrap around a class B derived from A + C local instance pattern common in c# etc...
for example....Last edited by MicroTrends; 05-12-2015, 04:54 AM.
Comment
-
Wow perfecto! you are very fantastic for changing that :-)Originally posted by NinjaTrader_Dierk View PostThanks. Will be implemented with next beta: #8209
That will negate the need for changing param names for this scenario also:
as the new keyword will stop the incorrect recursion message
therefore that has two solutions...
many thanks
that has plagued me for a long time :-)
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
672 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
379 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 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
577 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
582 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment