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

Horizontal Line?

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

    Horizontal Line?

    Hello,

    How do I draw a horizontal line that I can move to different heights?

    I've tried the AddLine ... but it always draws at zero height. The only way I can change the height is using the configuration panel.

    Many Thanks, Caesar.

    #2
    Hello Skechers,

    Thank you for your post.

    You can use Draw.HorizontalLine() to draw a line at any price level you like:



    Please let us know if we may be of further assistance to you.

    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Well,

      I have tried these and can't get a line:

      Code:
      HorizontalLine LineHi = Draw.HorizontalLine(this,"MACDHi", Threshold, Brushes.Yellow);
      HorizontalLine LineLo = Draw.HorizontalLine(this,"MACDLo", Threshold*-1, Brushes.Yellow);
      Draw.HorizontalLine(this, "tag1", 5, Brushes.White);
      I've tried in OnStateChange, OnBarUpdate, and OnDataLoaded ..

      What am I missing?

      Many Thanks, Caesar.​

      Comment


        #4
        Hello Skechers,

        Thank you for your reply.

        Are you trying to draw the lines in an indicator panel and not the price panel? If so, make sure DrawOnPricePanel is set to false in State.SetDefaults and you should see them show up.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ageeholdings, Today, 07:43 AM
        0 responses
        7 views
        0 likes
        Last Post ageeholdings  
        Started by pibrew, Today, 06:37 AM
        0 responses
        4 views
        0 likes
        Last Post pibrew
        by pibrew
         
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        12 views
        0 likes
        Last Post burtoninlondon  
        Working...
        X