Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 24
|
Hello, I am interested in writing a scan that includes a pcf that indicates if there has been a 50day crossing a 200 day within the past 15 days. is there a way to include such a pcf? If this in not possible is there a way to write the pcf that shows stocks where 50day and 200 day are withing a X percent of eachother?
Thank you!
mikeh
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 4,308
|
50 Crossing 200 Last 15 Days (AVGC50>AVGC200 AND AVGC50.15<AVGC200.15) OR (AVGC50<AVGC200 AND AVGC50.15>AVGC200.15)
50 vs. 200 100*(AVGC50/AVGC200)
With the first formula, keep in mind that there could have been multiple crosses in a 15 day period. The formula simply finds stocks where at least one crossup or one crossdown has occurred within the 15 day period...and that if the 50 was below the 200 15 days ago, it is above now...and if the 50 was above the 200 15 days ago, it is below now.
With your second forumla, you will look for stocks returning values X percent above or X percent below 100. This can be done as a sort, or used as a scan condition.
- Doug Teaching Online!
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
We can do both.
50 cross 200
(AVGC50>AVGC200 AND AVGC50.1<AVGC200.1) OR (AVGC50<AVGC200 AND AVGC50.1>AVGC200.1)OR (AVGC50.1>AVGC200.1 AND AVGC50.2<AVGC200.2) OR (AVGC50.1<AVGC200.1 AND AVGC50.2>AVGC200.2)OR (AVGC50.2>AVGC200.2 AND AVGC50.3<AVGC200.3) OR (AVGC50.2<AVGC200.2 AND AVGC50.3>AVGC200.3)OR (AVGC50.3>AVGC200.3 AND AVGC50.4<AVGC200.4) OR (AVGC50.3<AVGC200.3 AND AVGC50.4>AVGC200.4)OR (AVGC50.4>AVGC200.4 AND AVGC50.5<AVGC200.5) OR (AVGC50.4<AVGC200.4 AND AVGC50.5>AVGC200.5)OR (AVGC50.5>AVGC200.5 AND AVGC50.6<AVGC200.6) OR (AVGC50.5<AVGC200.5 AND AVGC50.6>AVGC200.6)OR (AVGC50.6>AVGC200.6 AND AVGC50.7<AVGC200.7) OR (AVGC50.6<AVGC200.6 AND AVGC50.7>AVGC200.7)OR (AVGC50.7>AVGC200.7 AND AVGC50.8<AVGC200.8) OR (AVGC50.7<AVGC200.7 AND AVGC50.8>AVGC200.8)OR (AVGC50.8>AVGC200.8 AND AVGC50.9<AVGC200.9) OR (AVGC50.8<AVGC200.8 AND AVGC50.9>AVGC200.9)OR (AVGC50.9>AVGC200.9 AND AVGC50.10<AVGC200.10) OR (AVGC50.9<AVGC200.9 AND AVGC50.10>AVGC200.10)OR (AVGC50.10>AVGC200.10 AND AVGC50.11<AVGC200.11) OR (AVGC50.10<AVGC200.10 AND AVGC50.11>AVGC200.11)OR (AVGC50.11>AVGC200.11 AND AVGC50.12<AVGC200.12) OR (AVGC50.11<AVGC200.11 AND AVGC50.12>AVGC200.12)OR (AVGC50.12>AVGC200.12 AND AVGC50.13<AVGC200.13) OR (AVGC50.12<AVGC200.12 AND AVGC50.13>AVGC200.13)OR (AVGC50.13>AVGC200.13 AND AVGC50.14<AVGC200.14) OR (AVGC50.13<AVGC200.13 AND AVGC50.14>AVGC200.14)OR (AVGC50.14>AVGC200.14 AND AVGC50.15<AVGC200.15) OR (AVGC50.14<AVGC200.14 AND AVGC50.15>AVGC200.15)
50 as a % of 200
100*AVGC50/AVGC200
This will return the 50 as a percent of the 200. A value greater than 100 means the 50 is above the 200, a value less than 100 means the 50 is below the 200 and a value of 100 means they are the same (touching). The closer the value is to 100 the closer the two averages are to each other.
- Craig Here to Help!
|
|
Guest-1 |