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