Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawline Width

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

    Drawline Width

    Hi. I need help. I am trying to convert an indicator I had in NT6.5 to the NT7 Beta. It's a very simple indicator but sense transferring I had to change the way it draws the line and now I can't change the thickness of the line anymore. This is what I have. Thanks for any help on this.

    DrawHorizontalLine("Current_price" , Close[1] + 1 * TickSize, Color.Lime);

    #2
    cre8it8, Intellisense would offer you two overloads, you need to use the second, expanded one for your request, so you can set the width parameters.

    Code:
     
    DrawHorizontalLine(string tag, bool autoScale, double y, Color color, DashStyle dashStyle, int width)

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      cre8it8, Intellisense would offer you two overloads, you need to use the second, expanded one for your request, so you can set the width parameters.

      Code:
       
      DrawHorizontalLine(string tag, bool autoScale, double y, Color color, DashStyle dashStyle, int width)
      I could use some help on the ,bool autoScale, part. The problem is I don't have an example of this code because it seems that most programs plot lines not draw them and the way that NT7 is asking me to code it is different than the original indicator I used in NT6.5.

      This is what I have so far:

      DrawHorizontalLine("Current_price1", autoScale, Close[1] + 2 , Color.Lime, DashStyle.Solid, 5);

      Thanks for any help.

      Comment


        #4
        cre8it8,

        In that part all you have to do is type either true or false depending on if you want this object to auto scale the y-axis or not.

        DrawHorizontalLine("Current_price1", true, Close[1] + 2 * TickSize, Color.Lime, DashStyle.Solid, 5);
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          cre8it8,

          In that part all you have to do is type either true or false depending on if you want this object to auto scale the y-axis or not.

          DrawHorizontalLine("Current_price1", true, Close[1] + 2 * TickSize, Color.Lime, DashStyle.Solid, 5);
          I was "So close but yet so far away".

          Thanks for the help! It works perfect.

          By the way I am loving NT7.

          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