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 04-09-2007, 01:08 AM   #1
ThePatientOne
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I have created a few custom indicators for NT6. Because of the way NT6 requires multiple plots for multiple colors per line when plotting, some of these indicators have 6 or more plots. Certain pairs of these plots share settings and so I made parameters to accept the settings for these including color. When I set up my charts the way I want them, I saved a template. When I close and re-open a chart and apply the template, the color settings are missing and set to "unknown" (or something to that effect).

Can you look into this? Is it a bug or can NT6 templates not handle saving inputs of class type 'Color'?

Thank you!
ThePatientOne is offline  
Reply With Quote
Old 04-09-2007, 01:30 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

For clarification, you have a property that is a color and this property is not recovering? If yes, then take a look at the VolumeProfile indicator source code.

You will need to handle your color properties like this:
Quote:
Quote:
///<summary>
///</summary>
[XmlIgnore()]
[Description(
"Color of volume bars representing sell trades.")]
Quote:
[Category("Colors")]
[Gui.Design.DisplayNameAttribute(
"Sell color")]
public Color VolumeColorDown
{
get { return volumeColorDown; }
set { volumeColorDown = value; }
}

///<summary>
///</summary>
[Browsable(
false)]
publicstring VolumeColorDownSerialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString( volumeColorDown); }
set { volumeColorDown = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
}


NinjaTrader_Ray is offline  
Reply With Quote
Old 04-09-2007, 05:04 AM   #3
ThePatientOne
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Thank you Ray ... this resolved my issues.
ThePatientOne 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


All times are GMT -6. The time now is 04:21 AM.