NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-08-2010, 06:48 PM   #1
dnoff
Senior Member
 
Join Date: Jan 2009
Posts: 111
Thanks: 0
Thanked 0 times in 0 posts
Default Strange Bug with Indicator Parameter Section Fields and Enum's

I have just spent the past hours pulling my hair out trying to understand why the following two snippets from some indicators would compile or not.

Before I show them, I have a set custom public Enum's in the UserDefinedMethods Class (I have changed the enum name in the samples below).

The first snippet compiles perfectly:

Code:
[Description("Custom Enum Type"), Category("Parameters")]
[NinjaTrader.Gui.Design.DisplayName("PressureCalculation Type")]
public CustomTypes CustomType
{
            get { return this.customType; }
            set { this.customType = value; }
}
Note the order/layout of the "[Description("") ...] tag.

The second snipped will not compile at all and I get errors at not being able to find the Enum (are you missing the assembly error).

Code:
[Description("Custom Enum Type")]
[Category("Parameters")]
[NinjaTrader.Gui.Design.DisplayName("PressureCalculation Type")]
public CustomTypes CustomType
{
            get { return this.customType; }
            set { this.customType = value; }
}
Simply splitting the Description and Category fields causing the compile to fail. Why would you care you may ask??

Well functionally who cares, but when trying to use Intellisence to allow to me easily add indicators in other indicators and strategies, it works fine with the second snippet, but will not correctly show the methods with the first.

Maybe it is something I am doing wrong here, but I can reproduce this easily now - including after restarting NT several times.
dnoff is offline  
Reply With Quote
Old 02-09-2010, 03:29 PM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

dnuff, thanks for posting - I'm not sure if this is a supported use of enums, will need to check with development on this and will update this thread.
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Chart Trader Bug mjc4118 Version 7 Beta General Questions & Bug Reports 9 01-06-2010 02:05 PM
A little bit of confusion in the indicator section... Harry Miscellaneous Support 10 11-09-2009 07:47 AM
Indicator Section of Forum Harry Miscellaneous Support 2 07-28-2009 01:58 AM
Very Strange Bug r2kTrader Strategy Development 10 06-19-2009 11:34 AM
Strange bug in NT zer0balance Strategy Development 15 12-25-2008 02:46 AM


All times are GMT -6. The time now is 03:04 PM.