NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 06-01-2007, 02:55 PM   #1
MJT
Senior Member
 
Join Date: Jun 2006
Posts: 111
Thanks: 0
Thanked 1 time in 1 post
Default Use Indicator plot color in DrawLine()

I am drawing trendlines using DrawLine(), but would like to use the color that is user specified for a particular indicator plot. So that if the indicator plot color is changed by the user then the DrawLine() color will also change. Is there a way I can programatically access the indicator plot color if it has been changed since adding it to a chart?

thanks,
MJT is offline  
Reply With Quote
Old 06-01-2007, 03:13 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Please check out the HeikenAshi source code which has color properties:

/// <summary>
/// </summary>
[XmlIgnore()]
[Description("Color of down bars.")]
[Category("Visual")]
[Gui.Design.DisplayNameAttribute("Down color")]
public Color BarColorDown
{
get { return barColorDown; }
set { barColorDown = value; }
}

/// <summary>
/// </summary>
[Browsable(false)]
public string BarColorDownSerialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString( barColorDown); }
set { barColorDown = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
}
NinjaTrader_Dierk 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
How to plot an indicator only on the current session max1ci6 Indicator Development 2 04-24-2007 07:50 PM
Color Plot Problem on Modified CCI Indicator KBJ Indicator Development 5 04-18-2007 01:21 PM
Indicator max and min plot values ThePatientOne Indicator Development 3 04-12-2007 05:10 AM
My indicator has a Color property and I need to be able to persist and recover it ThePatientOne Indicator Development 2 04-09-2007 05:04 AM
Changing Plot color within code tquinn Indicator Development 8 02-19-2007 08:27 AM


All times are GMT -6. The time now is 01:11 PM.