Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/30/2004 Posts: 7
|
Hi -- I'm afraid I'm asking a really basic question here. I wish to create a PCF identifying equities trading at a 20 period RSI of less than 40. I'm using a wilder smoothed-RSI here, so am I correct in assuming that the formula would be...
[RSI formula]<40C?
or would it be
C[RSI formula]<40?
or do I not need a "C" at all.
I'm so confused...
Thanks for your help.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You don't need the "C" at all.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/30/2004 Posts: 7
|
Thanks so much, Bruce! Now I'm trying to graduate to something a little more complex. Might you be able to offer some guidance here as well?
Here's what I'm trying to do. I want to set Bollinger Bands with 18 periods and 1.5 standard deviations. Then I want to screen for stocks using the following criteria...
long for stocks over the 60 dma, where the following formula
(closing price - lower bollinger band value)/(upper bollinger band value - lower bollinger band value) > 0.7
short for stocks under the 60 dma where the exact same formula is < .03
Is this "pcf-able"? Might you be able to offer a few pointers here? This is just frying my simple little brain as I get used to the pcf conventions
Thanks (again) so much for your help.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I didn't know if you wanted the 60-Day Moving Average to be Simple or Exponential.
Price vs BB Width: (C-AVGC18+1.5*SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2 +C5^2 +C6^2 +C7^2 +C8^2 +C9^2 +C10^2 +C11^2 +C12^2 +C13^2 +C14^2 +C15^2 +C16^2 +C17^2-18*AVGC18^2)/17))/3/SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2 +C5^2 +C6^2 +C7^2 +C8^2 +C9^2 +C10^2 +C11^2 +C12^2 +C13^2 +C14^2 +C15^2 +C16^2 +C17^2-18*AVGC18^2)/17)
Price vs 60-Period SMA: C/AVGC60
Price vs 60-Period EMA: C/XAVGC60
You may turn the above into Boolean Formulas by adding >.7, <.3, >1 or <1 to the end as appropriate, but you may want to consider using the PCFs without any changes in EasyScans instead. You could then sort by Price vs BB Width or Price vs its 60-DMA. The following video demonstrates this technique:
Constructing more versatile and reusable Personal Criteria Formulas
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/30/2004 Posts: 7
|
Thanks again, Bruce. For some reason, I'm not finding that EasyScan offers the opportunity to scan by BB width or or the 60 DMA. That is, when I click on "add new conditions" I get roster of maybe fifty or so conditions, none of which involves BB and only one of which involves a moving average (10 day crossing 200 day). Clearly, I'm missing something here (besides what's missing between my ears, that is).
On the PCF front, I'm still trying to parse this out. Let's say I wanted to screen for stocks using a 5 period, one standard deviation BB in a Boolean formula, again with price vs. 60 sma (above 60 for longs, below 60 for shorts). Am I correct in assuming the PCF would then be...
longs
(C-AVGC5+1*SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2 +C5^2-5*AVGC5^2)/4))/3/SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2 +C5^2-5*AVGC5^2)/4)>.7 C/AVGC60
shorts
C-AVGC5+1*SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2 +C5^2-5*AVGC5^2)/4))/3/SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2 +C5^2-5*AVGC5^2)/4)>.3 C/AVGC60
?
If this is correct, what does the /3/ in the middle of the formular refer to? And is there some kind of comprehensive, systematic tutorial to be found on creating PCFs?
You're a patient man, sir, and I'm grateful.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Check out these videos on sorting by BBs
Sort using envelopes, regression channels and Bollinger bands
Finding Expanding or Contracting Bollinger Bands
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
osterlundp, The techniques shown in the videos Craig mentioned are very good and usually easier than writing PCFs, but since you seem to want to learn how to write Personal Criteria Formulas, let me provide some additional follow-up. You will need to create and update the PCFs for them to show up as conditions for EasyScans. Once this is done, they will show up in alphabetical order. Please check out the following videos, topics and Online Help File entries for help writing PCFs and including them in EasyScans:
Using EasyScan to find stocks that meet your own criteria How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs! Personal Criteria - Introduction Creating Personal Criteria Personal Criteria Language Personal Criteria Language Function List Formula Clipboard
Here are the corrected forms for straight Boolean versions with 5-Period, 1 Standard Deviation Bollinger Bands and Price vs 60-Period SMA left as a ratio:
Longs: (C-AVGC5+SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2-5*AVGC5^2)/4))/2/SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2-5*AVGC5^2)/4)>.7 AND C/AVGC60>1
Shorts: (C-AVGC5+SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2-5*AVGC5^2)/4))/2/SQR((C^2 +C1^2 +C2^2 +C3^2 +C4^2-5*AVGC5^2)/4)<.3 AND C/AVGC60<1
The 3 in the first group of formulas was just double the Standard Deviation. Since we are now using a Standard Deviation of 1, that changes to a 2. An AND was added between the conditions since both need to be True and leaving it out would probably produce a syntax error. Finally, a >1 or <1 was added after C/AVGC60 (this is more complicated than C>AVGC60 or C<AVGC60, but I wanted to leave them in the reusable and sortable forms I gave in my Saturday, May 21, 2005 7:46:24 AM response).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/30/2004 Posts: 7
|
Thanks so much. You guys are phenomenal.
|
|
Guest-1 |