Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

plot dash line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

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

    Try changing to Line.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      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.

      Comment


        #4
        I would think it is because a line can be a dashed line but a dot cant be dashed?
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        160 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        308 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X