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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        569 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        548 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X