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 Moving Average in a PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
MarcM
Posted : Tuesday, April 12, 2005 3:10:01 PM
Registered User
Joined: 2/27/2005
Posts: 59
On a standard chart I view a stock graph in a weekly view. I can also run a moving average against that chart...say a 10 period MA. I gather that the system is taking either the highest value for the week or the last value for the week and running a 10 period MA against the 10 values. (By the way which is it?) So I get a real nice 10 period MA of the weekly view of the stock.

Question is...is there any way to do the same thing in a PCF. If I wanted to create a PCF where I am testing that the weekly close is above the weekly 10 period MA...how can I do that. That's not the same thing as running a 5 day MA and comparing the daily close to the 5 day MA.

Thanks for the help.
Doug_H
Posted : Tuesday, April 12, 2005 3:50:30 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
One way to do this is to use a simple formula as a Custom Percent True indicator. The formula is:

C>AVGC10

Plot the indicator (smoothing average of 1), and change to a weekly chart. Do an Actual Value sort on any WatchList, and all of the stocks where the latest weekly bar close is above the 10 bar moving average will return values of 100.

By the way, a 10 bar moving average is computed based on the closing price for each bar. On a weekly chart, that's the close for the 5 day (weekly) period represented by each bar.

- Doug
Teaching Online!
MarcM
Posted : Tuesday, April 12, 2005 4:36:31 PM
Registered User
Joined: 2/27/2005
Posts: 59
So as I understand it the weekly high that is graphed is the average of all 5 highs during that week?

Sorry but I still don't understand the second part of your reply. If I'm interested in setting up a Scan using two PCF's where the first PCF selects those stocks that have a weekly close above the 10 week moving average (true/false) and a seconf PCF where the % gain of the 10 week moving average over the last two periods is greater than 0...how would I do that?

Thanks again for all of your help.
Craig_S
Posted : Tuesday, April 12, 2005 5:33:33 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
On a five-day chart the most recent bar is constructed using:

The most recent close
The open four days ago
The highest high for the 5 days
The lowest low for the 5 days

The formula for the 10-bar average on a weekly chart is:

(C+C5+C10+C15+C20+C25+C30+C35+C40+C45)/10

So if you want the close on a weekly chart above the 10-bar average on that chart use:

C/((C+C5+C10+C15+C20+C25+C30+C35+C40+C45)/10)*100

This will return the close as a percent of the value of the 10-bar average. Values above 100 mean that C is more than 100% of the value of the average (it is above it).

Over what period do you want the percent gain of the average on a weekly chart measured (in bars, not days)?

- Craig
Here to Help!
MarcM
Posted : Tuesday, April 12, 2005 5:49:51 PM
Registered User
Joined: 2/27/2005
Posts: 59


Thank you. Very helpful.
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.