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

Questions about MultiCharts and user contributed studies.
PD Quig
Posts: 151
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 53 times
Been thanked: 8 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: 6585
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

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

Postby TJ » 23 May 2012

PD Quig wrote: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”