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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 12-17-2009, 06:11 AM   #1
velocity
Senior Member
 
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
Default plot dash line

I am trying to plot a dashed line. Thought the following code would do it, but it does not plot a dashed line. In stead I get a dot. Where am I going wrong?

protectedoverridevoid Initialize()
{
Add(
new Plot(new Pen(Color.FromKnownColor(KnownColor.Yellow), 2), PlotStyle.Line, "High"));
Add(
new Plot(new Pen(Color.FromKnownColor(KnownColor.Blue), 2), PlotStyle.Dot, "Low"));
// Set the pen used to draw the plot as a dashed line
Plots[1].Pen.DashStyle = DashStyle.Dash;

Thanks
velocity is offline  
Reply With Quote
Old 12-17-2009, 06:34 AM   #2
eDanny
Senior Member
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 899
Thanks: 0
Thanked 19 times in 17 posts
Default

Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Blue), 2), PlotStyle.Dot, "Low"));

Try changing to Line.
eDanny is offline  
Reply With Quote
Old 12-17-2009, 07:13 AM   #3
velocity
Senior Member
 
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks, That did the trick. Kind of strange though that since it is overriding the Line that it would not override the Dot.

Oh well. Thanks again.
velocity is offline  
Reply With Quote
Old 12-17-2009, 07:22 AM   #4
eDanny
Senior Member
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 899
Thanks: 0
Thanked 19 times in 17 posts
Default

I would think it is because a line can be a dashed line but a dot cant be dashed?
eDanny 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
Plot Line - Solid vs. DOT DASH Scaling issue mjc4118 Version 7 Beta General Questions & Bug Reports 2 10-29-2009 11:56 PM
Trying to Plot Line in Strategy yamdigger Strategy Development 2 05-27-2009 11:17 AM
Plot horizontal line ssg10 General Programming 1 05-13-2009 05:54 AM
Line Plot velocity General Programming 10 05-07-2009 05:59 AM
Plot Line Length ozfader General Programming 3 07-12-2008 11:39 PM


All times are GMT -6. The time now is 08:03 AM.