Every discussion till now has been about making parameters. Parameters are expected to show on grids and as such need to use GridCategory instead of Category. Your use-case is a different scenario.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
GridCategory Suggestion for 6.5
Collapse
X
-
Ok thanks. DanOriginally posted by NinjaTrader_Josh View PosteDanny,
Every discussion till now has been about making parameters. Parameters are expected to show on grids and as such need to use GridCategory instead of Category. Your use-case is a different scenario.
Comment
-
Here is the sample. I also attached a screen shot of the error I'm getting. There must be some .cs file somewhere that's messing it up, but I don't know what.Originally posted by NinjaTrader_Josh View PosteDanny,
I believe you can filter it by overriding the ToString() method.
cassb,
Can you provide a quick sample to demonstrate the issue? This way we will be able to see all the relationships of your code. Thank you.
Comment
-
Originally posted by eDanny View Postcassb, you need to use this in the Variables instead:
private Test myInput0 = Test.One;
or Test.Two or Test.Three, whichever is the default.
Oops... sorry. Here's the new version with the correct Variable declaration. It still doesn't compile.Attached Files
Comment
-
here you go
attached version compiles!
You must clarify your concept of C#. The error had nothing to do with Ninja.
regards
andreas
p.s.
if you do
#if NT7
[GridCategory("Parameters")]
#else
[Category("Parameters")]
#endif
the same code will compile on either NT65 or NT7Attached FilesLast edited by zweistein; 04-14-2010, 03:13 AM.
Comment
-
Originally posted by Mindset View PostYes that's what I do.
You can also do it for say
#if NT7
X = ChartControl.GetXByBarIdx(BarsArray[0],CurrentBar);
#else
X = ChartControl.GetXByBarIdx(CurrentBar) ;
#endif
Oh, that's fantastic -- I would love to only have one version of code to support. Thanks, I'll try it.
But still, I do have a problem with the "enum" command for some reason. When I change from Category to GridCategory, I'm still getting the error message that I posted above. Either something is missing or there's some script or something that is causing the error on my PC only. How do I track this down?
Comment
-
Originally posted by zweistein View Post@cassb
I see that you did not download the file from #22, which contains the solution to your problem. (Filename is same as before, but content is different)
regards
Andreas
Oh...I see what you did now. You put the enum into its own namespace? Is that required in NT7 now? But yes, your version does compile on my computer now. Thank you!
Comment
-
Well, what I had working OK in v6.5 was all my enums were in the Properties region of each indicator. Now in v7.0, something has changed that does not allow this any more. However, putting enums into their own namespace then basically 'removes' them from the specific routine and makes them global. So that I will need to distribute a dummy routine with just all the enumerators in it along with any one or more of the indicators. That's kinda of a pita. Is there a better way to do this so that enums can be declared locally in each indicator routine instead?Originally posted by NinjaTrader_Josh View PostBelieve you should have always put the enums outside.
Thanks!
Comment
-
OK. Can you point me to a page or a keyword I can look up that deals with distributing a dummy routine like this with compiled indicators? Could I create a DLL for this routine and have it automatically made a reference or something when the user imports the zip file?Originally posted by NinjaTrader_Josh View PostUnfortunately this is not supported. I don't believe this was ever recommended to be done in the manner you mentioned for 6.5 either.
Thanks, Josh!
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
615 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
357 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
561 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
566 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment