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

AddLine() - Dynamic

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

    AddLine() - Dynamic

    Hello everyone, is there any chance/method for me to make the Line dynamic?

    Let's say that, I want my line to everyday change depending on certain value..

    e.g.:

    18/02 - Close was 10.20, so my line should be not at 'value 0', but in 10.20.
    19/02 - Close was 10.50 so now I want the line to "move" to 10.50.. and so ...

    I'm using this : AddLine(Brushes.Gray, 30, "Lower");

    I'm thinking maybe try to make "30" parameter dynamic?

    Thanks, sorry for potato english.

    #2
    Hello yamzeq,

    Thanks for your post.

    Yes, you can accomplish this with the AddLine() by changing the Lines[n] value in OnBarUpdate as needed.
    Please see the helpguide here for AddLine: http://ninjatrader.com/support/helpG...s/?addline.htm

    Please see the helpguide (and examples) for Lines: http://ninjatrader.com/support/helpG...-us/?lines.htm This shows how you can access some of the Lines properties.

    In OnBarUpdate() you can change the line value via: Lines[0].Value =

    If you are trying to show a session close value, you might consider using the NinjaTrader indicator PriorDayOHLC where you can turn off or on a line that shows the Open, High, Low or Close.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello yamzeq,

      Thanks for your post.

      Yes, you can accomplish this with the AddLine() by changing the Lines[n] value in OnBarUpdate as needed.
      Please see the helpguide here for AddLine: http://ninjatrader.com/support/helpG...s/?addline.htm

      Please see the helpguide (and examples) for Lines: http://ninjatrader.com/support/helpG...-us/?lines.htm This shows how you can access some of the Lines properties.

      In OnBarUpdate() you can change the line value via: Lines[0].Value =

      If you are trying to show a session close value, you might consider using the NinjaTrader indicator PriorDayOHLC where you can turn off or on a line that shows the Open, High, Low or Close.
      tyvm!!

      Yamzeq

      Comment


        #4
        Originally posted by NinjaTrader_Paul View Post
        Hello yamzeq,

        Thanks for your post.

        Yes, you can accomplish this with the AddLine() by changing the Lines[n] value in OnBarUpdate as needed.
        Please see the helpguide here for AddLine: http://ninjatrader.com/support/helpG...s/?addline.htm

        Please see the helpguide (and examples) for Lines: http://ninjatrader.com/support/helpG...-us/?lines.htm This shows how you can access some of the Lines properties.

        In OnBarUpdate() you can change the line value via: Lines[0].Value =

        If you are trying to show a session close value, you might consider using the NinjaTrader indicator PriorDayOHLC where you can turn off or on a line that shows the Open, High, Low or Close.
        Paul, in NT7 I had a "DrawRegion + parameters".

        How can I use Draw.Region if I have values storage in "Values[2][0], Values[3][0]", I can't figure it out how to make this work.

        Thanks.

        Comment


          #5
          Originally posted by yamzeq View Post
          Paul, in NT7 I had a "DrawRegion + parameters".

          How can I use Draw.Region if I have values storage in "Values[2][0], Values[3][0]", I can't figure it out how to make this work.

          Thanks.
          solved.

          thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Lumbeezl, 01-11-2022, 06:50 PM
          31 responses
          817 views
          1 like
          Last Post NinjaTrader_Adrian  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          7 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X