Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Linear regression of data that is not Series data

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

    Linear regression of data that is not Series data

    Hello,

    I would like to do a linear regression plot & r-squared calculation of a collection of 5 or so data points I gathered (each an x,y as in time, price).

    Unfortunately, the occurrence of these points is not aligned with any regularity in comparison to the Series data of the chart. In other words, the x's are at somewhat random intervals.

    Would you have any suggested approaches that involve NT8 indicator scripts, or is it better to write out the linear regression calculations by hand?

    Thank you,

    #2
    Hi,

    for the r-squared part it would be worth a shot to use the same algorithm like in the RSquared indicator, replace barIndex with index and Period with N.

    Comment


      #3
      Hey, thanks - the R-Squared indicator is certainly a great launch point for this, as are the other related functions.

      I keep forgetting there are actual scripts available for these built-in functions that I can copy and modify as appropriate!

      Appreciate the help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      264 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      169 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      171 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      258 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      210 views
      0 likes
      Last Post CarlTrading  
      Working...
      X