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 - irratic behaviour

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

    DrawLine - irratic behaviour

    When this regression line is drawn at historic bars (inclusive start) outside the bounds of the screen, it appears/disappears irraticaly when scrolling. Can´t find the logic causing this. Help appreciated!

    (Method enclosed)
    Attached Files
    Last edited by FREEN; 07-15-2015, 04:35 PM.

    #2
    Hello FREEN,

    Thank you for your post.

    For clarification, what interval-type of chart are you using? Are the regression lines NinjaTrader's default drawing lines or a 3rd party add-on?
    Riley S.NinjaTrader Customer Service

    Comment


      #3
      Minutes - tried 1, 10, 30 min. It´s the DrawLine() method included in default NinjaScript.

      Comment


        #4
        Hello Freen,

        Thanks for your reply.

        I believe you have found the limitation as far as distant drawing object anchor points go, the object would disappear with anchor points too far spread out, as you scroll the chart when one anchor point or the other comes closer the line reappears. This behavior is known in NinjaTrader 7. We have checked and tested for this in our next major release Ninjatrader 8.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          No worries as long as there´s no calculus misbehaviours in NinjaScript. Thanks!

          Comment


            #6
            Hmm... I don´t get it. These lines are only a few bars apart. Timescrolling shouldn´t execute indicator code, so I don´t get what´s wrong. Any other idea on what´s going wrong? The red lines are DrawLine() objects, the blue is a DrawRay() object.

            Zipped MP4 enclosed.
            Attached Files

            Comment


              #7
              Hello FREEN,

              Thanks for your post.

              What is interesting about the video is that the indicator name and parameters disappear and reappear with the lines.

              This may not be the same issue.

              Is the indicator publicly/freely available?
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                No, this is coded by me. No error in output window.

                If I change the autoscale argument to "true" even the price data disappears/reappears and the chart defaults to an empty minimal (0.01) scale at the errorous spots.

                If I remove the DrawLine() method from the code, this will alone cure the problem and all other draw objects will show as expected.
                Last edited by FREEN; 08-01-2015, 10:32 AM.

                Comment


                  #9
                  Hello Freen,

                  Thanks for your reply.

                  I've tried a number of tests with your code from the first post and have not been able to recreate the condition that is observable in your video. I am able to recreate the condition i mentioned where the draw object is wider than the chart and in that case the object will appear and disappear as I scroll through the chart however the indicator name text, in the upper left corner, remains on the charts whilst yours does not.

                  I would like to review your log and trace files and if possible the full code for the indicator so I could recreate here. Please send to [email protected] atten: paul and a link to this thread.
                  Paul H.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by maybeimnotrader, Yesterday, 05:46 PM
                  5 responses
                  24 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by NRITV, Today, 01:15 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post NRITV
                  by NRITV
                   
                  Started by quantismo, Yesterday, 05:13 PM
                  2 responses
                  16 views
                  0 likes
                  Last Post quantismo  
                  Started by frankthearm, Today, 09:08 AM
                  6 responses
                  26 views
                  0 likes
                  Last Post frankthearm  
                  Started by adeelshahzad, Today, 03:54 AM
                  5 responses
                  33 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Working...
                  X