Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set a Plot's Dash Style?

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

    How to set a Plot's Dash Style?

    Hello,

    I have found PlotBrushes, Plots[].PlotStyle, and Plots[].Width but I cannot find say Plots[].DashStyle?

    How would I change a plot's Dash Style? It can be a onetime code (OnStateChange), or it could also be dynamic in OnBarUpdate. Either would work.

    Many Thanks, Caesar.

    #2
    It is part of the plot's stroke. The stroke defines includes the concepts of color, thickness, and the line's style e.g. dashed, dottetd, etc.

    See also: https://ninjatrader.com/support/help...roke_class.htm
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello, thanks for writing in. The plot dash style can only be set once when the plot is set up. You can use this overload to set up the plot style:
      AddPlot(new Stroke(Brushes.Firebrick, 2), PlotStyle.Dot, "MyPlot");

      Comment


        #4
        Hi both,

        I found the DashStyle in Stroke.

        Many Thanks, Caesar.
        Last edited by Skechers; 05-25-2023, 12:27 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        559 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 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
        546 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X