| Building an
EasyScan: What I am going to attempt to do here is show one approach to building an EasyScan for finding stocks that meet certain criteria. By doing this you can cut down on the number of charts you need to look at. If you are looking through numerous charts for certain key occurrences, why not write PCFs to find those same events and then put them into an EasyScan. Suppose I add the 4, 9, and 18 simple moving averages to a chart as in the figure below. As you can see I have added the 4(yellow), 9(cyan), and 18(red) simple moving averages to this chart under indicator tab #1. I noticed from this chart that in October that the crossing of the 4ma up through the 9ma gave an indication of a possible buying opportunity. Rather than look through 8000+ charts it would be much easier to write a PCF to find this point. The PCF for the 4 ma is AVGC4, that's simple enough. The 9 ma is AVGC9. The 18ma we are not interested in at this time. These two PCFs tell us what the average 4 and 9 day closing price is today, December 16, 1998, the date these scans will take place on. The PCFs always tell us the answer for the present day. Later on I will get into how to move the PCFs back in time to do some testing at a date in the past. By testing in the past you can get an idea of how your PCFs and EasyScan would have performed on the stocks it picked on that past date. In writing this PCF we want the 4ma to be below the 9ma yesterday and we want the 4ma to cross up through the 9ma today, indicating a possible buy. For today we can write the following PCF to show the 4ma above the 9ma. AVGC4>AVGC9. This PCF states the 4ma of today is greater than the 9ma of today. Now we want to show the 4ma of yesterday to be below the 9ma of yesterday. To do that I am going to "back date" the PCF to look at yesterday. To do that you add the number of days you want to go back to the PCF. Here is the PCF. AVGC4.1<AVGC9.1 As you can see I have added the ".1" to the PCFs, this tells the program to do the calculations one day back from the present. This PCF states the 4ma of yesterday is less than the 9ma of yesterday. You could have used a different number here instead of "1" depending on the number of days back you want to go. Today is always "0" day with yesterday being "1" and so on depending how far back you want to go. Now we have to combine these two PCFs into one and we want them both to be true. (AVGC4>AVGC9) AND (AVGC4.1<AVGC9.1). The "AND" makes sure that both PCFs must be true to get a true condition for the entire PCF. So how do we enter this PCF into our system? On the menu at the top of the screen click on the "Fx" key.
This will bring up the following screen.
Now click on "Create New".
In the "Name Criterion" box type a name for the PCF and click "OK". The following window now appears. The window will be blank as we have yet to type in the PCF.
Type in the PCF that you have written in the empty window. When done click on the "Test" button to see if the PCF calculates.
This window tells you the results of your test. In this case IBM tested false to your PCF meaning that the 4ma is not crossing up through the 9ma on the date tested. Click on the "Close" button. Then click the "Save" button in the window that appears next. In the next window that appears select "All Stocks" from the pull down menu. Then click on the "Update all criteria" button to calculate the PCF for all the stocks in the "All Stocks" list.
The time it takes to do the calculations depends on the complexity of the PCF and if there are any other ones that are also being calculated at the same time. When the calculations are done click on the "OK" button. In the next window the last date the PCF was updated should appear in the list next to your PCF. Now click the "Close " button to close this window. Now to see how many stocks your PCF selected today go to the main screen on the left side where the list of stocks appears.
From the WatchList pull down select "All Stocks". From the Sort pull down select the PCF you created from the list. Click on the Descending circle. All stocks that are true for this PCF will be listed at the top of the list. Now scroll down the list to the last True stock and click on it to highlight it in blue. If you look at the bottom of the list you will see: AE: 423 of 8843 Items in WatchList". Since AE was the last True stock in the list this tells you there are 423 True selections out of 8843 in the database that the scan was run on. Looking at the list you will see that the stock ALKS does meet the criteria specified in the PCF again. So on December 16, 1998 ALKS signaled a possible buy again. As you can see from the rest of the graph it would have been a good signal as it went from $18.80 to the 30s.
If you check the volume of some of the stocks that appear in this list you will see some very low trading volume on some of them.To maintain liquidity I would like to see a volume of maybe 50K to 100K. So lets write another PCF to select stocks with some volume. Let's say we want the average volume over the last 21 days to be at least 50K. AVGV21.1>500. I don't want today's volume to influence the answer so I added the ".1" after the 21 to use only the previous 21 days in the calculation. Also the volume numbers always drop off the last two digits so 500 actually is 50000. Now I also want the volume today to be greater than the average volume over the previous 21 days. V>AVGV21.1 Putting these two together we end up with: (AVGV21.1>500) AND (V>AVGV21.1) Lets call this PCF #2-MA/4/9. Enter this PCF into the system the same way we did the first one. Test, save, and update all criteria. Since we have more than one PCF now we will put these into an EasyScan to make it easier to use. Go to the menu bar and click on the lightning bolt to create an EasyScan.
The following window then appears.
From this window click the "Create New " button. The window will be empty when it appears.
From the "Criterion Library" pull down select "Personal Criteria", The PCFs you have created should be in this list. Now one at a time highlight each one and click on the "Add Condition" button. In this case you would now have the two PCFs we created listed in the Big window. In the "Watchlist to Scan" window at the bottom use the scroll arrow to select the "All Stocks" list. This is the list we will be scanning with our EasyScan. Click on the "Save" button to save our EasyScan.
Now type in the name you want to give this EasyScan. Click the "OK" button when done. The next window that then appears shows you all the EasyScans. Click on "Scan Charts". Next to the EasyScan is a number, this number tells you how many stocks passed the test of that EasyScan.
In our case 83 passed the test. So we started with 8843 stocks, the first PCF got us down to 423 and the second one reduced us down to 83. It's a lot easier to look at 83 charts than 8843. You can even take this list down further by adding more PCF criteria to it, such as RSI, BOP, Stochastics, etc. This is basically how you design a system from the ground up. Start by looking at charts and look for patterns that appear and try different indicators to see which ones would have signaled you to buy. Write PCFs for these and enter them into an EasyScan to find those stocks. Don't forget you can also select "General", Media General Fundamentals", and "Technicals" from the EasyScan editing window. I have only touched on the very basics here, EasyScans can get very complex, but sometimes the simple ones work the best. |