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 Cross161, Yesterday, 10:33 PM
      0 responses
      3 views
      0 likes
      Last Post Cross161  
      Started by neilzep, Yesterday, 08:55 PM
      0 responses
      6 views
      0 likes
      Last Post neilzep
      by neilzep
       
      Started by javier.filgueira, Yesterday, 03:29 PM
      3 responses
      10 views
      0 likes
      Last Post javier.filgueira  
      Started by Da vinci, Yesterday, 03:15 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by Da vinci, Yesterday, 02:51 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X