Adding a linear regression (best fit) line to an indicator  [SOLVED]

Questions about MultiCharts and user contributed studies.
PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Adding a linear regression (best fit) line to an indicator

Postby PD Quig » 23 May 2012

Does MC (or anybody else?) have any code samples for feeding indicator data into the LinearReg function? I've got a custom indicator to which I'd like to apply a best fit line and have been chasing my tail. Any help or references would be hugely appreciated.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Adding a linear regression (best fit) line to an indicat  [SOLVED]

Postby TJ » 23 May 2012

Does MC (or anybody else?) have any code samples for feeding indicator data into the LinearReg function? I've got a custom indicator to which I'd like to apply a best fit line and have been chasing my tail. Any help or references would be hugely appreciated.
there is a built-in function for LinearReg.

just apply that to whatever data you have.


Return to “MultiCharts”