Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Moving Lin Regression Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ciddan
Posted : Thursday, June 19, 2014 5:23:26 PM
Registered User
Joined: 10/17/2011
Posts: 12

Hi,

is it possible to plot a histogram of the difference between two Moving Linear Regression lines? For example, I would have Moving Lin Reg 10 and Moving Lin Reg 50 displayed in my chart, and now I want to plot the difference between the two.

Thank you,

Frank

Bruce_L
Posted : Friday, June 20, 2014 9:31:54 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Please try using the following Indicator Formulas as the Formula in a Custom PCF Indicator with the Plot Style set to Histogram.

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis

AVGC10 + 4.5 * (4.5 * C + 3.5 * C1 + 2.5 * C2 + 1.5 * C3 + 0.5 * C4 - 0.5 * C5 - 1.5 * C6 - 2.5 * C7 - 3.5 * C8 - 4.5 * C9) / 82.5 - (AVGC50 + 24.5 * (24.5 * C + 23.5 * C1 + 22.5 * C2 + 21.5 * C3 + 20.5 * C4 + 19.5 * C5 + 18.5 * C6 + 17.5 * C7 + 16.5 * C8 + 15.5 * C9 + 14.5 * C10 + 13.5 * C11 + 12.5 * C12 + 11.5 * C13 + 10.5 * C14 + 9.5 * C15 + 8.5 * C16 + 7.5 * C17 + 6.5 * C18 + 5.5 * C19 + 4.5 * C20 + 3.5 * C21 + 2.5 * C22 + 1.5 * C23 + 0.5 * C24 - 0.5 * C25 - 1.5 * C26 - 2.5 * C27 - 3.5 * C28 - 4.5 * C29 - 5.5 * C30 - 6.5 * C31 - 7.5 * C32 - 8.5 * C33 - 9.5 * C34 - 10.5 * C35 - 11.5 * C36 - 12.5 * C37 - 13.5 * C38 - 14.5 * C39 - 15.5 * C40 - 16.5 * C41 - 17.5 * C42 - 18.5 * C43 - 19.5 * C44 - 20.5 * C45 - 21.5 * C46 - 22.5 * C47 - 23.5 * C48 - 24.5 * C49) / 10412.5)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ciddan
Posted : Friday, June 20, 2014 10:01:58 AM
Registered User
Joined: 10/17/2011
Posts: 12

Bruce,

Thank you for the formula and also for the link. I think I can construct this now, but where can I find the value for the Denom factor? You entered 10412.50 for the RL50; what would that number be for the RL90 and RL270 please?

Thanks agaiin,

Frank

Bruce_L
Posted : Friday, June 20, 2014 10:23:06 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The Tuesday, April 04, 2006 12:12:34 PM ET post by bustermu in the topic explores how to calculate the denominator.

P*(P^2-1)/12

Where P is the period of the linear regression.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.