Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 5/29/2014 Posts: 26
|
Bruce,
Does this look right for an EMA 21 Linear Regression Line PCF?
XAVGC21 + 10 * (10 * C + 15.5 * C1 + 14.5 * C2 + 13.5 * C3 + 12.5 * C4 + 11.5 * C5 + 10.5 * C6 + 9.5 * C7 + 8.5 * C8 + 7.5 * C9 + 6.5 * C10 + 5.5 * C11 + 4.5 * C12 + 3.5 * C13 + 2.5 * C14 + 1.5 * C15 + 0.5 * C16 - 0.5 * C17 - 1.5 * C18 - 2.5 * C19 - 3.5 * C20 - 4.5) / 780
As always, thank you for your help
Rod
|
|
Registered User Joined: 5/29/2014 Posts: 26
|
Bruce,
Let me complete the formula. Sorry
200 * (XAVGC21 + 10 * (10 * C + 15.5 * C1 + 14.5 * C2 + 13.5 * C3 + 12.5 * C4 + 11.5 * C5 + 10.5 * C6 + 9.5 * C7 + 8.5 * C8 + 7.5 * C9 + 6.5 * C10 + 5.5 * C11 + 4.5 * C12 + 3.5 * C13 + 2.5 * C14 + 1.5 * C15 + 0.5 * C16 - 0.5 * C17 - 1.5 * C18 - 2.5 * C19 - 3.5 * C20 - 4.5) / 780)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm not quite sure what you are trying to do, but it doesn't look right to me.
If you want to replace the simple moving average with an exponential moving average in the formula for the right endpoint of a linear regression line indicator (the same thing as a moving linear regression), then please try the following.
XAVGC21 + 10 * (10 * C + 9 * C1 + 8 * C2 + 7 * C3 + 6 * C4 + 5 * C5 + 4 * C6 + 3 * C7 + 2 * C8 + C9 - C11 - 2 * C12 - 3 * C13 - 4 * C14 - 5 * C15 - 6 * C16 - 7 * C17 - 8 * C18 - 9 * C19 - 10 * C20) / 780
But that actually seems like kind of unusual thing to do. The simple moving average in the formula is really just there to structure the calculations in a more understandable way.
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/29/2014 Posts: 26
|
Thanks Bruce.
I guess I need to go back to grade school because (21) -1) / 2 = 10
From there, I have no idea how I followed up with 15.5
i.e. XAVG21 + 10 * (10 * C + 15.5
I gotta admit, I was proud, but now I am ashamed :)
Thanks for all you do!
Rod
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Don't beat yourself up. It is really easy to mess things up. I generally create formulas in Excel to eliminate typos, test it in the program to make sure it matches and then copy and paste it to the forums and I still sometimes post stuff that is wrong.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/29/2014 Posts: 26
|
Bruce,
Can you recommend literature to create the formulas in Excel, or do you just start it and let excel complete it in sequence? i.e. 1*2, 1*3, 1*4 .....
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I gave a basic description of the technique I use in my Sunday, August 21, 2005 8:28:46 AM ET post in the Need help writing a PCF for r-squared topic.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |