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

Regression channel not visible if startpoint outside bounds of chart

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

    Regression channel not visible if startpoint outside bounds of chart

    Hi,

    If you draw a linear regression channel on a chart, say, from open to current bar, then resize your chart so the first bars are no longer visible and off the left of the chart, the regression channel no longer shows, even though it is still very much applicable. I'm drawing them with Draw.RegressionChannel.

    Any fix for this?

    Thanks.


    #2
    Hello pjsmith,

    Thank you for your note.

    I'm not able to replicate this on the latest version of the platform - when I draw a regression channel and resize the chart, either manually or from a script the regression channel remains visible. What version of the platform are you currently running? You can find this under Help > About. The current version is 8.0.23.2.

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate - Thanks for testing. My version is 8.0.23.2 64-bit

      I attached a short clip of it doing it. The 2 regression channels are the indigo lines. 2 and 4 std deviations I think. If this gif does not animate on the forum, you can watch the video clip here https://drive.google.com/file/d/1yLJ...ew?usp=sharing

      Click image for larger version  Name:	QAZRogcdGB.gif Views:	0 Size:	26.1 KB ID:	1145868
      Last edited by pjsmith; 03-10-2021, 01:19 PM.

      Comment


        #4
        Hello pjsmith,

        Thank you for your reply.

        Is this drawn using the built in Regression Channel drawing tool, or how is it being created? In my tests I'm using the Regression Channel drawing tool that's built into NinjaTrader.

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Hi,

          As stated, with the Draw.RegressionChannel. Here is the exact line of code

          lrc3 = Draw.RegressionChannel(this, "lrc3", false, i, RedrawEveryXBars > 0 ? RedrawEveryXBars*-1 : -3, LRC3Stroke.Brush,LRC3Stroke.DashStyleHelper, (int) LRC3Stroke.Width, LRC3Stroke.Brush, LRC3Stroke.DashStyleHelper, 1,LRC3Stroke.Brush, LRC3Stroke.DashStyleHelper, (int) LRC3Stroke.Width);

          Thanks, btw - Just installed new release from a few hours ago. Is the same.

          Comment


            #6
            Hello pjsmith,

            Thank you for your reply.

            I'm not able to replicate this on my end with a simple test script. Can you provide a simplified example script that replicates the behavior on your end? Any other code besides the code necessary to draw the regression channel should be removed.

            Thanks in advance; I look forward to assisting you further.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              I'll see if i can come up with something over the weekend. For info, I tried to reproduce with a manually drawn regression channel using all the same settings (from a template) as the auto draw one, and the issue does not occur. Of relevance perhaps is the fact the start bar is the first bar of the session.Thanks.

              Comment


                #8
                By chance, I tried something. I turned off 'Locked' and 'Extend right' on the drawing object, and the issue no longer occurs. I think something may be buggy with those options on. Tuning them back on, the problem comes back. I tested this many times by enabling those 2 options, scrolling chart, verifying issue, disabling those 2 items, scrolling chart, etc. It's definitely those options that cause this.

                Comment


                  #9
                  And, further confirmed. I changed my indicator to add these 2 lines. This is the only change.

                  lrc3.IsLocked = false;
                  lrc3.ExtendRight = fal se;

                  The problem is no longer there. I think this is an issue with the ninjarader, not my code.

                  Comment


                    #10
                    Hello pjsmith,

                    Thank you for you reply.

                    Were you able to create a simple example indicator that replicates this? I'd be happy to submit it to my development team and have them take a look, but we'll need reduced code to do that.

                    Thanks in advance; I look forward to assisting you further.
                    Kate W.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello,

                      No - That will cost me for my time and as I now have a workaround for the issue/bug, I may not as I have other work to do. If I do, I will forward it, but I've provided all the info I can to allow your dev team to replicate the issue as well as the workaround and they should clearly be able to see it happening in the video.

                      Thanks.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by PaulMohn, Today, 05:00 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post PaulMohn  
                      Started by ZenCortexAuCost, Today, 04:24 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post ZenCortexAuCost  
                      Started by ZenCortexAuCost, Today, 04:22 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post ZenCortexAuCost  
                      Started by SantoshXX, Today, 03:09 AM
                      0 responses
                      16 views
                      0 likes
                      Last Post SantoshXX  
                      Started by DanielTynera, Today, 01:14 AM
                      0 responses
                      5 views
                      0 likes
                      Last Post DanielTynera  
                      Working...
                      X