Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Draw.RegressionChannel values

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

    Accessing Draw.RegressionChannel values

    Hi,

    I'm drawing a regression channel on a price series using Draw.RegressionChannel(), but then getting the data for the same from RegressionChannel() in order to do calculations. It occurred to me when I added this to a chart with several hundred bars, that it takes quite a long time to calculate and draw the channels. By using the 2 different calls, I am likely doubling the amount of work as the calculation is likely being done twice.

    Is there a way for me to use draw.regressionchannel() and simply retrieve the last values for the upper and lower channel, like I could with the series from RegressionChannel() ?

    Thanks.

    #2
    Hello pjsmith,

    Thank you for the post.

    The performance hit is likely coming from the multiple chart drawings and not the series calculation. Notice how the Regression Channel indicator only draws during real-time data and it employs the OnRender method to render the channel to the screen. One option is to ignore the historical data when drawing the Regression Chanel and only draw it in real time. The other option is to do what the Regression Channel does and use OnRender to draw only between the visible bars on the chart.

    Please let me know if you have any questions on these topics.

    Comment


      #3
      Hello pjsmith,

      Thanks for your post.

      The Regression Channel drawing tool exposes StandardDeviationLowerDistance and StandardDeviationUpperDistance which give the distance in standard deviations from the center line. This information could be used to calculate the price level where the Upper and Lower bands reside, but the price level is not provided directly.

      Publicly available documentation on the Regression Channel drawing object and available properties can be found here - https://ninjatrader.com/support/help...ionchannel.htm

      Please let us known if you have any additional questions.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      567 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X