![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2009
Posts: 111
Thanks: 0
Thanked 0 times in 0 posts
|
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; }
}
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; }
}
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. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |