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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X