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 |

weekly MACD pcf Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
GoodFortune
Posted : Monday, February 21, 2005 10:58:20 AM
Registered User
Joined: 10/7/2004
Posts: 14
Hi there,
I wonder if you could help me write a pcf for 12 week exponential moving average minus 26 week exponential moving average. This is actually the MACD or fast line, but for the weekly time frame instead of the usual daily time frame.

Many thanks in advance.

Good fortune.
Craig_S
Posted : Monday, February 21, 2005 11:05:44 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Check out this topic, you may find what you need here:

Creating Scans for Weekly/Monthly

- Craig
Here to Help!
Tanstaafl
Posted : Monday, February 21, 2005 4:06:21 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Good Fortune:

I've posted a very comprehensive set of accurate MACD and MACDH PCF's for a variety of Days/Bar (including Weekly) in the following thread:

MACD(H)'s for N-day Bars - an archive of PCF's

Jim Dean

GoodFortune
Posted : Tuesday, February 22, 2005 1:06:15 AM
Registered User
Joined: 10/7/2004
Posts: 14
Thanks to both Craig and Jim Dean. You are both very helpful.

I have checked out the weekly MACD 12,26 ,9 given and it does correspond to the chart.

I have just two more queries.
Do you have the formula for 50 week simple moving average?. I believe that this approximates but does not equate to the 250 day simple moving average.

Secondly , coming back to the weekly MACD question, could you please tweak it a bit more for weekly MACD with parameters 13,30,4. I am particularly interested in the MACD or fast line reading.

Warmest regards,

Stephen
Doug_H
Posted : Tuesday, February 22, 2005 8:59:36 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
If you plot a 50 bar moving average on your chart, and if your chart is set to a weekly time frame, you will be looking at a 50 week moving average (which is the average of 50 data points on a weekly bar chart). You are correct that it approximates but does not equate to a 250 day moving average (which is the average of 250 data points on a daily bar chart).

I'll leave the MACD question for others to answer.

- Doug
Teaching Online!
Tanstaafl
Posted : Tuesday, February 22, 2005 10:14:09 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Stephen:

The 50-week Simple MA is something that you should be able to do for yourself ... I hope the formula will be clear enough not to require explanation:

( C0 +C5 +C10 +C15 +C20 +C25 +C30 +C35 +C40 +C45 +C50 +C55 +C60 +C65 +C70 +C75 +C80 +C85 +C90 +C95 +C100 +C105 +C110 +C115 +C120 +C125 +C130 +C135 +C140 +C145 +C150 +C155 +C160 +C165 +C170 +C175 +C180 +C185 +C190 +C195 +C200 +C205 +C210 +C215 +C220 +C225 +C230 +C235 +C240 +C245 ) / 50


The Weekly 13,30 MACD (the 4 has nothing to do with the MACD spec, btw, since MACD = FastEMA-SlowEMA) with <0.01% error is:

.0001*( 857.2238*C0 +685.779*C5 +541.6255*C10 +420.7045*C15 +319.5462*C20 +235.1853*C25 +165.088*C30 +107.0903*C35 +59.3444*C40 +20.2736*C45 -11.4676*C50 -37.026*C55 -57.3791*C60 -73.3593*C65 -85.6751*C70 -94.9289*C75 -101.6325*C80 -106.2205*C85 -109.0612*C90 -110.4667*C95 -110.7008*C100 -109.9863*C105 -108.511*C110 -106.433*C115 -103.8847*C120 -100.9772*C125 -97.8032*C130 -94.4397*C135 -90.9505*C140 -87.3883*C145 -83.796*C150 -80.2088*C155 -76.6549*C160 -73.1571*C165 -69.7331*C170 -66.3967*C175 -63.1583*C180 -60.0256*C185 -57.0039*C190 -54.0965*C195 -51.3052*C200 -48.6306*C205 -46.0721*C210 -43.6283*C215 -41.2972*C220 -39.0761*C225 -36.9622*C230 -34.952*C235 -33.0421*C240 -31.2289*C245 -29.5086*C250 -27.8775*C255 -26.3316*C260 -24.8674*C265 -23.4811*C270 -22.169*C275 -20.9277*C280 -19.7536*C285 -18.6436*C290 -17.5942*C295 -16.6026*C300 -15.6657*C305 -14.7806*C310 -13.9446*C315 -13.1552*C320 -12.4098*C325 -11.7062*C330 -11.0419*C335 -10.4149*C340 -9.8232*C345 -9.2649*C350 -8.738*C355 -8.2408*C360 -7.7718*C365 -7.3292*C370 -6.9118*C375 -6.518*C380 -6.1465*C385 -5.7962*C390 -5.4657*C395 -5.154*C400 -4.86*C405 -4.5828*C410 -4.3213*C415 -4.0747*C420 -3.8422*C425 -3.6229*C430 -3.416*C435 -3.221*C440 -3.0371*C445 -2.8637*C450 -2.7002*C455 -2.546*C460 -2.4006*C465 -2.2635*C470 -2.1342*C475 -2.0123*C480 -1.8974*C485 -1.789*C490 -1.6868*C495 -1.5904*C500 -1.4996*C505 -1.4139*C510 -1.3331*C515 -1.257*C520 -1.1851*C525 -1.1174*C530 -1.0536*C535 -.9934*C540 -.9366*C545 -.8831*C550 -.8327*C555 -.7851*C560 -.7402*C565 -.6979*C570 -.6581*C575 -.6205*C580 -.585*C585 -.5516*C590 -.5201*C595 -.4903*C600 -.4623*C605 -.4359*C610 -.411*C615 -.3875*C620 -.3654*C625 -.3445*C630 -.3248*C635 -.3062*C640 -.2887*C645 -.2722*C650 -.2567*C655 -.242*C660 -.2282*C665 -.2152*C670 -.2029*C675 -.1913*C680 -.1803*C685 -.17*C690 -.1603*C695 -.1512*C700 -.1425*C705 -.1344*C710 -.1267*C715 -.1195*C720 -.1126*C725 -.1062*C730 -.1001*C735 -.0944*C740 -.089*C745 -.0839*C750 -.0791*C755 -.0746*C760 -.0703*C765 -.0663*C770 -.0625*C775 -.059*C780 -.0556*C785 -.0524*C790 -.0494*C795 -.0466*C800 -.0439*C805 -.0414*C810 -.0391*C815 )

Just in case you wanted the Weekly 13,34,4 MACD Histo, with <0.01% error:

.0001*( 514.3347*C0 +205.7339*C5 +36.9481*C10 -50.3838*C15 -90.9253*C20 -105.1718*C25 -105.1615*C30 -97.8955*C35 -87.3848*C40 -75.8734*C45 -64.5688*C50 -54.0763*C55 -44.6577*C60 -36.3828*C65 -29.2191*C70 -23.0838*C75 -17.8724*C80 -13.4763*C85 -9.7902*C90 -6.7174*C95 -4.1709*C100 -2.0738*C105 -.3591*C110 +1.0314*C115 +2.1478*C120 +3.0331*C125 +3.7243*C130 +4.2527*C135 +4.6451*C140 +4.9245*C145 +5.11*C150 +5.2184*C155 +5.2633*C160 +5.2567*C165 +5.2084*C170 +5.1269*C175 +5.0192*C180 +4.8911*C185 +4.7477*C190 +4.5931*C195 +4.4306*C200 +4.2631*C205 +4.093*C210 +3.9221*C215 +3.7519*C220 +3.5838*C225 +3.4187*C230 +3.2573*C235 +3.1003*C240 +2.9481*C245 +2.801*C250 +2.6593*C255 +2.5231*C260 +2.3924*C265 +2.2672*C270 +2.1476*C275 +2.0334*C280 +1.9244*C285 +1.8207*C290 +1.722*C295 +1.6282*C300 +1.5391*C305 +1.4545*C310 +1.3743*C315 +1.2982*C320 +1.2261*C325 +1.1579*C330 +1.0933*C335 +1.0322*C340 +.9743*C345 +.9196*C350 +.8679*C355 +.819*C360 +.7729*C365 +.7292*C370 +.688*C375 +.6491*C380 +.6123*C385 +.5776*C390 +.5449*C395 +.5139*C400 +.4847*C405 +.4572*C410 +.4312*C415 +.4067*C420 +.3835*C425 +.3617*C430 +.3411*C435 +.3217*C440 +.3033*C445 +.2861*C450 +.2697*C455 +.2544*C460 +.2399*C465 +.2262*C470 +.2133*C475 +.2011*C480 +.1896*C485 +.1788*C490 +.1686*C495 +.159*C500 +.1499*C505 +.1413*C510 +.1333*C515 +.1257*C520 +.1185*C525 +.1117*C530 +.1053*C535 +.0993*C540 +.0936*C545 +.0883*C550 +.0833*C555 +.0785*C560 +.074*C565 +.0698*C570 +.0658*C575 +.062*C580 +.0585*C585 +.0552*C590 +.052*C595 +.049*C600 +.0462*C605 +.0436*C610 +.0411*C615 +.0387*C620 +.0365*C625 +.0344*C630 +.0325*C635 +.0306*C640 +.0289*C645 +.0272*C650 +.0257*C655 +.0242*C660 +.0228*C665 +.0215*C670 +.0203*C675 +.0191*C680 +.018*C685 +.017*C690 +.016*C695 +.0151*C700 +.0143*C705 +.0134*C710 +.0127*C715 +.0119*C720 +.0113*C725 +.0106*C730 )




Tanstaafl
Posted : Tuesday, February 22, 2005 10:18:03 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Oops sorry the two long equations in the last post are not correct ... I used 13,34 instead of 13,30 in my expansion. Here are the correct formulae:

13,30 Weekly Exponential MACD, <0.01% error:

.0001*( 783.4875*C0 +621.0131*C5 +485.0105*C10 +371.4876*C15 +277.0361*C20 +198.7475*C25 +134.1406*C30 +81.0996*C35 +37.8216*C40 +2.7708*C45 -25.3599*C50 -47.6827*C55 -65.1425*C60 -78.5422*C65 -88.5628*C70 -95.7814*C75 -100.6869*C80 -103.6923*C85 -105.1465*C90 -105.3434*C95 -104.5305*C100 -102.9151*C105 -100.6714*C110 -97.9444*C115 -94.8551*C120 -91.5037*C125 -87.973*C130 -84.3312*C135 -80.6338*C140 -76.9258*C145 -73.2437*C150 -69.6161*C155 -66.0657*C160 -62.61*C165 -59.262*C170 -56.0312*C175 -52.9242*C180 -49.9451*C185 -47.096*C190 -44.3774*C195 -41.7885*C200 -39.3275*C205 -36.9916*C210 -34.7777*C215 -32.682*C220 -30.7003*C225 -28.8284*C230 -27.0617*C235 -25.3956*C240 -23.8257*C245 -22.3472*C250 -20.9558*C255 -19.6469*C260 -18.4163*C265 -17.2598*C270 -16.1735*C275 -15.1533*C280 -14.1956*C285 -13.2969*C290 -12.4537*C295 -11.6628*C300 -10.9211*C305 -10.2257*C310 -9.5739*C315 -8.963*C320 -8.3906*C325 -7.8542*C330 -7.3518*C335 -6.8811*C340 -6.4403*C345 -6.0275*C350 -5.6409*C355 -5.279*C360 -4.9401*C365 -4.6228*C370 -4.3258*C375 -4.0478*C380 -3.7876*C385 -3.544*C390 -3.316*C395 -3.1027*C400 -2.903*C405 -2.7161*C410 -2.5412*C415 -2.3776*C420 -2.2245*C425 -2.0812*C430 -1.9471*C435 -1.8217*C440 -1.7043*C445 -1.5945*C450 -1.4917*C455 -1.3955*C460 -1.3056*C465 -1.2214*C470 -1.1427*C475 -1.069*C480 -1.0001*C485 -.9356*C490 -.8753*C495 -.8188*C500 -.766*C505 -.7166*C510 -.6704*C515 -.6272*C520 -.5867*C525 -.5489*C530 -.5135*C535 -.4803*C540 -.4494*C545 -.4204*C550 -.3933*C555 -.3679*C560 -.3442*C565 -.322*C570 -.3012*C575 -.2818*C580 -.2636*C585 -.2466*C590 -.2307*C595 -.2158*C600 -.2019*C605 -.1889*C610 -.1767*C615 -.1653*C620 -.1546*C625 -.1446*C630 -.1353*C635 -.1266*C640 -.1184*C645 -.1108*C650 -.1036*C655 -.0969*C660 -.0907*C665 -.0848*C670 -.0794*C675 -.0742*C680 -.0695*C685 -.065*C690 -.0608*C695 -.0569*C700 -.0532*C705 -.0498*C710 -.0465*C715 -.0435*C720 -.0407*C725 )

13,30,4 Exponential Weekly MACD Histo, <0.01% error:

.0001*( 470.0916*C0 +184.5705*C5 +29.1409*C10 -50.6291*C15 -87.0482*C20 -99.202*C25 -98.2853*C30 -90.7957*C35 -80.4442*C40 -69.2969*C45 -58.4566*C50 -48.4676*C55 -39.5564*C60 -31.7737*C65 -25.0765*C70 -19.3771*C75 -14.5695*C80 -10.545*C85 -7.1995*C90 -4.4379*C95 -2.1749*C100 -.3358*C105 +1.1448*C110 +2.3231*C115 +3.2474*C120 +3.9593*C125 +4.494*C130 +4.8815*C135 +5.1473*C140 +5.3132*C145 +5.3972*C150 +5.4149*C155 +5.3791*C160 +5.3009*C165 +5.1894*C170 +5.0521*C175 +4.8954*C180 +4.7247*C185 +4.5443*C190 +4.3577*C195 +4.168*C200 +3.9774*C205 +3.7879*C210 +3.6011*C215 +3.4181*C220 +3.2399*C225 +3.0671*C230 +2.9003*C235 +2.7398*C240 +2.5858*C245 +2.4386*C250 +2.298*C255 +2.1641*C260 +2.0368*C265 +1.916*C270 +1.8014*C275 +1.693*C280 +1.5904*C285 +1.4935*C290 +1.402*C295 +1.3157*C300 +1.2344*C305 +1.1579*C310 +1.0858*C315 +1.018*C320 +.9543*C325 +.8944*C330 +.8381*C335 +.7852*C340 +.7356*C345 +.6891*C350 +.6454*C355 +.6044*C360 +.566*C365 +.5299*C370 +.4962*C375 +.4645*C380 +.4348*C385 +.4071*C390 +.381*C395 +.3566*C400 +.3338*C405 +.3124*C410 +.2924*C415 +.2736*C420 +.256*C425 +.2396*C430 +.2242*C435 +.2098*C440 +.1963*C445 +.1837*C450 +.1719*C455 +.1608*C460 +.1505*C465 +.1408*C470 +.1317*C475 +.1232*C480 +.1153*C485 +.1079*C490 +.1009*C495 +.0944*C500 +.0883*C505 +.0826*C510 +.0773*C515 +.0723*C520 +.0677*C525 +.0633*C530 +.0592*C535 +.0554*C540 +.0518*C545 +.0485*C550 +.0454*C555 +.0424*C560 +.0397*C565 +.0371*C570 +.0347*C575 +.0325*C580 +.0304*C585 +.0284*C590 +.0266*C595 +.0249*C600 +.0233*C605 +.0218*C610 +.0204*C615 +.0191*C620 +.0178*C625 +.0167*C630 +.0156*C635 +.0146*C640 +.0137*C645 +.0128*C650 +.012*C655 +.0112*C660 )


GoodFortune
Posted : Tuesday, February 22, 2005 10:22:37 AM
Registered User
Joined: 10/7/2004
Posts: 14
Jim ,
Thanks a bunch for all your help.

Stephen
Tanstaafl
Posted : Tuesday, February 22, 2005 10:27:18 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
You're welcome.

One final note re the %error info ... the formulae would be considerably shorter if the error limit was just 1% or 0.1%, but over several years of use and testing of these formulae, I've found consistently that 0.01% is the necessary precision in order to match the actual Histo plots on TC's charts.

In some cases, 0.1% is OK for the plain MACD, or for its plain signal line, but when the Histo difference between the two is required, more precision is necessary.

I sorta doubt that anyone cares about this, but just in case you were wondering ... now you know!

Jim Dean

wilberking
Posted : Tuesday, March 8, 2005 2:17:36 PM
Registered User
Joined: 10/22/2004
Posts: 44
Tanstaafl,
Would you willing to post the PCF for a weekly 3-10-16 MACD (simple). I realize that the 16 means nothing when determining the FAST MACD. However I would also like to use a SIGNAL line in my scans. I would need the PCF of the current week and the prior week.

Regards, Bill
Craig_S
Posted : Tuesday, March 8, 2005 2:39:05 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
...for all reading this thread:

Don't forget visually sorting for MACD (as a histogram or not) is quick and easy and can be done with any settings and over any time frame. Here is a video on visual sorting...

Sort by Visual Value to find new highs and lows in price and indicators

- Craig
Here to Help!
Tanstaafl
Posted : Tuesday, March 8, 2005 4:38:34 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Bill:

Please first consider using the visual SortBy tools with the chart set on weekly bars to help you with this, first.

For the nonce, I'm happy to post simple specific PCF's here and there, but my primary interest is in educating people ... normally I charge for consulting work to create truly complex PCF's, etc ... but W does not allow me to provide contact info for those situations, so I am doing my best to help out in bits and pieces.

So, here's some things to consider for the future:

1. Most people consider the MACD to be an Exponential indicator ... it is supposed to be used to help you identify recent changes in price velocity and acceleration (the Histo) ... and using Simple MA's pretty much destroys the value behind that idea, since they are not forward-weighted averages. Please note in the equations below how the "middle" terms of the signal line are missing, and that significant weight is given to the oldest bars. This illustrates the point.

2. If you are requesting help with PCF's, especially unpaid help <grin>, please be VERY specific and VERY complete in your explanations about what you need and what you are trying to do with it. Otherwise a whole series of back-and-forth exchanges occur ... this really eats up a lot of time. If you don't have the time or patience to fully explain your needs and application, then it's not very fair to ask others to do it for you. Don't get me wrong ... I'm happy to help ... but I just don't want to waste time.

OK, sermon is over now. :~)

Here is what you were requesting - you will need to put the pieces together into something useful. I suppose you are looking for a crossover-PCF, but since you did not say, here are the components:

3,10 Simple MACD (most recent 5-day bar):
.1*( +2.3333*C0 +2.3333*C5 +2.3333*C10 -C15 -C20 -C25 -C30 -C35 -C40 -C45 )

3,10 Simple MACD (prior bar, with 5-day bars):
.1*( +2.3333*C5 +2.3333*C10 +2.3333*C15 -C20 -C25 -C30 -C35 -C40 -C45 -C50 )

3,10,16 Simple MACD Signal line, most recent 5-dy bar:
.01*( +1.4583*C0 +2.9167*C5 +4.375*C10 +3.75*C15 +3.125*C20 +2.5*C25 +1.875*C30 +1.25*C35 +.625*C40 -1.4583*C80 -2.9167*C85 -4.375*C90 -3.75*C95 -3.125*C100 -2.5*C105 -1.875*C110 -1.25*C115 -.625*C120 )

3,10,16 Simple MACD Signal line, prior 5-dy bar:
.01*( +1.4583*C5 +2.9167*C10 +4.375*C15 +3.75*C20 +3.125*C25 +2.5*C30 +1.875*C35 +1.25*C40 +.625*C45 -1.4583*C85 -2.9167*C90 -4.375*C95 -3.75*C100 -3.125*C105 -2.5*C110 -1.875*C115 -1.25*C120 -.625*C125 )

Jim Dean

wilberking
Posted : Wednesday, March 9, 2005 12:11:27 PM
Registered User
Joined: 10/22/2004
Posts: 44
Jim,

Thanks so much for the response. I'm trying to implement a scan for a indicator presented by Linda Raschke at the Traders Expo in NYC. She calls it the 3-10 oscillator. She specs it out as the difference between a 3 day SMA and 10 day SMA. She refers to this line as the Momentum. Additionally, there's a second line which is a 16 period SMA of the Monmentum line. Which she refers to as the Trend.

You are correct in assuming that I want to use these PCFs for scanning crossover scenarios. I like to apply them to scans for weekly as well as daily time frames.

I turly appreciate the help.

Regards,
Bill
Craig_S
Posted : Wednesday, March 9, 2005 1:12:23 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Based on what you are saying, she is talking about a MACD of 3,10,16. I am putting together a video on scanning for MACD in multiple time frames and hope to have it up by early next week. I'll post a link to it here.

- Craig
Here to Help!
wilberking
Posted : Monday, March 14, 2005 11:44:06 AM
Registered User
Joined: 10/22/2004
Posts: 44
Yes Craig. You're correct that she suggests setting up a 3-10-16 MACD. Using simple moving averages rather than exponential.

Regards,
Bill
Craig_S
Posted : Monday, March 14, 2005 11:46:19 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
I am still working on the video. You can visually sort by your weekly MACD by right clicking on it and choosing SORT BY.

Check out this video:

Sort by Visual Value to find new highs and lows in price and indicators

- Craig
Here to Help!
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.