![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 899
Thanks: 0
Thanked 19 times in 17 posts
|
Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Blue), 2), PlotStyle.Dot, "Low"));
Try changing to Line. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 899
Thanks: 0
Thanked 19 times in 17 posts
|
I would think it is because a line can be a dashed line but a dot cant be dashed?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |