Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set the Dash Style

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

    How to set the Dash Style

    For every plot there is Plot style and a Dash style.

    The Add() does not have a parameter where you can set the Dash style. And far as I can tell you can not set the Dash style using the Plots[].

    Is there anyway to set the Dash style inside the indicator?

    #2
    Add(new Plot(Color.Blue, PlotStyle.Hash, "Support"));
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Plot objects are managed by the Plots collection. If you only have one plot in your indicator, the plot object rests in the collection at index 0.

      So to change the dash style, add the following line of code in Initialize() after adding the plot itself.

      Plots[0].Pen.DashStyle = DashStyle.Dash;
      RayNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      87 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      47 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      66 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      69 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      59 views
      0 likes
      Last Post CarlTrading  
      Working...
      X