Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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)
    BertrandNinjaTrader Customer Service

    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 Kaledus, Today, 01:29 PM
          5 responses
          12 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by alifarahani, Today, 09:40 AM
          5 responses
          23 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by PhillT, Today, 02:16 PM
          2 responses
          7 views
          0 likes
          Last Post PhillT
          by PhillT
           
          Working...
          X