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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X