• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Regression Channel code needs fixing to work in other panels

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

    Regression Channel code needs fixing to work in other panels

    Hi there,

    Just noticed the other day I was trying to plot an LRC using my indicator as the Input in the 2nd panel. The stdv bands were not plotting right. They would increase/decrease in width based on the height of the first panel!

    The culprit is:

    Code:
    ChartPanel    panel            = chartControl.ChartPanels[0];
    Please change all 'panel' instances to plain 'ChartPanel' or
    ChartPanel panel = chartControl.ChartPanels[ChartPanel.PanelIndex]

    Thank you.
    Attached Files
    Last edited by Sim22; 04-15-2016, 06:43 PM.

    #2
    Hello,

    Thank you for reporting this one. I can see the same thing, so I will send a report to the team to investigate further.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      New code problem to be fixed

      New problem:

      Similar to the previous problem but now also on price. I am aware of the 0/infinity checks. It is not these.
      Usually occurs on currencies or Crude.
      You may not be able to replicate this one since it may only arise under certain situations and instruments.

      The code:

      Code:
      int            stdDevPixels    = (int) Math.Round(((stdDev*Width)/(ChartPanel.MaxValue - ChartPanel.MinValue))*ChartPanel.H, 0);
      should be replaced by:

      Code:
      int            stdDevPixels    = (int) Math.Round(((stdDev*Width)/(chartScale.MaxMinusMin))*ChartPanel.H, 0);
      This is closer to the original NT7 code. Now it works well.

      Thank you.
      Last edited by Sim22; 05-03-2016, 07:05 PM.

      Comment


        #4
        Hello,

        Thank you for providing this sample. I will forward this to development for review.

        When I provide this I would like to add in addition to the syntax a scenario that displays the difference. if you have a scenario that displays this currently that would be helpful to add if you would like to provide the settings used.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you Jesse.
          I'm not sure what you mean.
          You mean tick difference between Upper and Lower?

          Comment


            #6
            Hello,

            I was just checking if you had seen any specific situation where this code makes the difference between the indicator working correctly and not. in the case you do have any situation where this shows a visible difference, I could provide that along with the description of the change for development to review.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              The first occasion was when using UniRenko bars on historical data. I can't remember the details.
              The second occasion was when using a modified version of ChelseaB's toolbar with buttons which I'm sure is 'tampering' with internal chartcontrol calculations.
              The toolbar causes no other problems just the LRC.
              Every other situation is fine for the LRC.

              I ended up coding my own LRC but just thought I'd let you know for other users.

              Thank you.
              Last edited by Sim22; 05-06-2016, 07:16 PM.

              Comment


                #8
                Hello,

                Thank you for the details, I will note these items as well.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by Sim22 View Post
                  The first occasion was when using UniRenko bars on historical data. I can't remember the details.
                  The second occasion was when using a modified version of ChelseaB's toolbar with buttons which I'm sure is 'tampering' with internal chartcontrol calculations.
                  The toolbar causes no other problems just the LRC.
                  Every other situation is fine for the LRC.

                  I ended up coding my own LRC but just thought I'd let you know for other users.

                  Thank you.
                  Sim22....can you plot your regression channel into the future beyond existing chart data from a start point on a chart...??

                  thanks....

                  Comment


                    #10
                    Alfred,

                    are you wanting this as a feature?

                    I will be uploading a very modified LRC shortly.

                    Comment


                      #11
                      Originally posted by Sim22 View Post
                      Alfred,

                      are you wanting this as a feature?

                      I will be uploading a very modified LRC shortly.
                      Hi....yes....being able to plot to a target in the future would be great...
                      drag from your start point to the target....then monitor as it updates to the target.

                      thanks much...

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by lavalampmj, Today, 05:25 PM
                      0 responses
                      1 view
                      0 likes
                      Last Post lavalampmj  
                      Started by Antares66, Today, 05:19 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post Antares66  
                      Started by jmneto, Today, 05:18 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post jmneto
                      by jmneto
                       
                      Started by Bobbyj78, Today, 02:21 PM
                      2 responses
                      12 views
                      0 likes
                      Last Post bltdavid  
                      Started by EnveousColnago, Today, 02:10 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Ariana  
                      Working...
                      X