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 to nowhere

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

    drawline to nowhere

    I connect the up down arrows with a drawline .. The blue line is a good one (pic) but black line goes to the left of session to nowhere.
    I reset on FirstBarofSession: PivotBarNum,ExtremeBar. but have a line drawn to the left of my session start time to nowhere.. more annoying then anything, any ideas?


    DrawLine("sls" + CurrentBar,CurrentBar - PivotBarNum,High[CurrentBar - PivotBarNum],ExtremeBar,Low[ExtremeBar],Color.Black,DashStyle.Solid,1);
    Attached Files

    #2
    gg80108,

    It is not drawing to nowhere. It is drawing to some anchor point you have in the past. I suggest you zoom out on your chart a lot to find that anchor point or you can also try printing your variables to see where it is anchoring on that particular line.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      gg80108,

      It is not drawing to nowhere. It is drawing to some anchor point you have in the past. I suggest you zoom out on your chart a lot to find that anchor point or you can also try printing your variables to see where it is anchoring on that particular line.
      Yep did scroll back,, now ya see it now ya dont
      Attached Files

      Comment


        #4
        gg80108,

        If the anchor points are in view the line will be visible.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          gg80108,

          If the anchor points are in view the line will be visible.
          printed CurrentBar numbers,

          The 1736 bar shows the line,, but when I back up to the 1735 bar, the line vanishes.. : 1736 is still in view
          Attached Files

          Comment


            #6
            Which bars are your anchor points? From your screenshots it looks like none of those bars are anchor points.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Yes thats the point,, only the bars in the current session in the first screen shots are the anchor points,, this is a mystery why it it drawing to the left at all...
              But when you think about it if you do a drawline before you have two valid points, maybe this is what it does??

              Coded to insure two valid anchors and problem went away.
              Last edited by gg80108; 05-01-2009, 12:24 PM.

              Comment


                #8
                Not sure I follow. Which bars are the anchors exactly? Just because a new session starts shouldn't really influence anchor points.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Coded to insure two valid anchors and problem went away. I wanted everything to start from scratch every session and not carry over. So I reset everything at the beginning of session. Looks like first time through only had one valid anchor and the other was infinity I guess.

                  Comment


                    #10
                    Glad you got it resolved.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Segwin, 05-07-2018, 02:15 PM
                    10 responses
                    1,769 views
                    0 likes
                    Last Post Leafcutter  
                    Started by Rapine Heihei, 04-23-2024, 07:51 PM
                    2 responses
                    30 views
                    0 likes
                    Last Post Max238
                    by Max238
                     
                    Started by Shansen, 08-30-2019, 10:18 PM
                    24 responses
                    943 views
                    0 likes
                    Last Post spwizard  
                    Started by Max238, Today, 01:28 AM
                    0 responses
                    10 views
                    0 likes
                    Last Post Max238
                    by Max238
                     
                    Started by rocketman7, Today, 01:00 AM
                    0 responses
                    7 views
                    0 likes
                    Last Post rocketman7  
                    Working...
                    X