Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 30
|
Is it possible to write a PCF for the moving linear regression (Period-3, Extension-0, Point to plot-0, width-0) of a 8-18-9 MACD crossing the 9 bar EMA of the same 8-18-9 MACD.
Crazy question I know, but it seems to work on a chart.
Thanks for any input you might have.
WD
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
This could take a while, so before I start, let's make sure we are both on the same page. You have a MACD set up as follows:
MACD Settings: - Short: 8 - Long: 18 - Period: 9 - Average Type: Exponential - Plot MACD as Histogram: Checked
You have then applied the following two child indicators to the above:
Moving Linear Regression Settings: - Period: 3 - Extension: 0 - Point to Plot: 0 - Width: 0
Moving Average Settings: - Period: 9 - Average Type: Exponential - Shift Left: Unchecked
Assuming the above, I have one more question... just how different are the 3-Period Linear Regression and the underlying MACD on your charts (especially as this applies to how it applies to crossover points versus the 9-Period Exponential Moving Average of the same MACD)? I'm not noticing much difference on my charts and am wondering if our settings are actually the same.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 30
|
You have it exactly right. I'm not sure how to answer your next question, so I will tell you how I have it set up. I first put the 8-18-9 MACD histogram on the chart. Then I added the 3 moving linear regression, and the 9 bar EMA as overlays on the histogram. When the moving linear regression line crosses the EMA either up or down, it just confirms what the MACD is doing. Hope this makes sense.
WD
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please add a 1-Period Moving Average to the MACD for me (it doesn't matter if it is Simple or Exponential). Is there a significant difference (as in happening on different days) between the crossover points of this new Moving Average and the 9-Period Exponential Moving Average and the crossover points of the 3-Period Linear Regression and the 9-Period Exponential Moving Average?
If there is a significant difference, could you provide some example symbols so I can figure out what I'm doing wrong before I try writing the formula?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 30
|
Both the 1 day moving average and the 3 period moving linear regression follow the MACD exactly the same. The only difference is when I use the 3 period moving linear regress and the 9 bar EMA , the moving linear regression will crosss the EMA at some point, usually a little before the stock either goes up or down. This is the way I actually have it set up. Yellow MACD 13-26-9 Green MACD 8-18-9 Blue Mov LinReg 3 White EMA 9 Sorry to be so unhelpful, but this is the only way I know to explain it.
WD
|
|
Registered User Joined: 10/7/2004 Posts: 30
|
Bruce, is there anyway I can send you a picture of my chart?
WD
|
|
Registered User Joined: 10/7/2004 Posts: 30
|
Bruce, in my slow plodding way. I have finally realized that by using a 1 day moving avg and a 9 day moving avg I get the same results as the mov linreg and moving avg. Boy do I feel stupid, but I still don't know how to write the PCF even using the 2 mov avgs.
WD
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
They shouldn't be exactly the same, but now that I think we are on the same page, I'm fairly confident I can write this (although it will take me some time to actually go through the steps required to create the formula). It will be a bit shorter this way than with the Linear Regression.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following:
SGN(324 * XAVGC8 - 4 * XAVGC18 - 365 * XAVGC9 + 45 * XAVG(XAVGC9,9)) - SGN(324 * XAVGC8.1 - 4 * XAVGC18.1 - 365 * XAVGC9.1 + 45 * XAVG(XAVGC9.1,9)) <> 0
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs! Cascades of Moving Averages
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 30
|
WOW !!!!!!!!
Bruce this is great. Thank you ever so much !!!
WD
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (kpnkool) I have finally realized that by using a 1 day moving avg and a 9 day moving avg I get the same results as the mov linreg and moving avg.
WD,
Crossings of the EMA9 and the LRMA3 do not coincide with crossings of the EMA9 and the Histogram. I looked for the most recent disagreement for the three indexes:
1) DJ-30: On 01/25/07, EMA9 and Hist. crossed; EMA9 and LRMA3 did not. 2) SP-500: On 01/26/07, EMA9 and LRMA3 crossed; EMA9 and Hist. did not. 3) COMPQX: On 02/12/07, EMA9 and LRMA3 crossed; EMA9 and Hist. did not.
Bruce supplied you a PCF for an EMA9 and Hist. crossing only.
Thanks, Jim Murphy
|
|
Registered User Joined: 10/7/2004 Posts: 30
|
Jim,
Thank you for pointing that out. I appreciate the input.
WD
|
|
Guest-1 |