Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Control Line style from indicator

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

    Control Line style from indicator

    I am drawing a simple line in an indicator....which works well.

    The problem comes when I try to tell indicator to draw a 'dash-dot-dot'
    instead of a solid line.
    When I try to add DashStyle parameter to the command....(see below)

    Add(new Line(Color.DimGray, DashStyle.DashDotDot, -100, "Level -1"));

    I get an error saying that I have too many arguments.

    I'm getting a mental blank on this...and for some reason can't figure it out.
    Any help would be appreciated...

    Thanks.............

    #2
    Hi photog53,

    You can add the DashStyle after the Add line, within Initialize()

    Something like...
    Code:
    Add(new Line(Color.DimGray, -100, "Level -1"));
    Lines[0].Pen.DastStyle=DashStyle.DashDotDot
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks!!
      ....(probably should have thought of that, but for some reason I couldn't get the concept right)

      One more quick question....If I am drawing mulitple lines, will the "pen" command
      apply to all of them or only one specific line?


      As always, you guys are great!!

      Last edited by photog53; 06-07-2010, 08:37 AM.

      Comment


        #4
        Hi photog53,


        This will be specific to that line or plot.

        For example...
        Code:
        Add(new Line(Color.DimGray, -0, "Level 1"));
        Add(new Line(Color.DimGray, -100, "Level 2"));
        
        Lines[0].Pen.DastStyle=DashStyle.DashDotDot;
        Lines[1].Pen.DastStyle=DashStyle.Dash;
        TimNinjaTrader Customer Service

        Comment


          #5
          Great!!! (thanks again)

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X