Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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.
|
|
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!
|
|
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.
|
|
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!
|
|
Registered User Joined: 2/27/2005 Posts: 59
|
Thank you. Very helpful.
|
|
Guest-1 |