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 sjsj2732, Yesterday, 04:31 AM
      0 responses
      31 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      286 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      283 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      133 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      91 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X