StockFetcher Forums · Filter Exchange · How To Search for MA(20), MA(50), MA(100), MA(200) Cross Over<< 1 2 >>Post Follow-up
1 posts
msg #35908
Ignore hsinchou
5/5/2005 2:59:48 PM

To help a newbie.

Can any help me design a search for MA(20), MA(50), MA(100), and MA(200) Crossover within the last 5 days and price range or all are within 2% of all MA?

Thank you in advance.

6,358 posts
msg #35911
Ignore TheRumpledOne
5/5/2005 9:53:14 PM

Not 100% sure what you mean...

this will give the stocks where the close crossed above the ma(20):

Fetcher[close crossed above ma(20)]

this will give you stocks where the ma(20) crossed above the ma(50):

Fetcher[ma(20) crossed above ma(50)]

But what you may what is one of my "secret" displays:

Fetcher[set{a1, count(close crossed above ma(20) ,1) }
set{a2, count(close crossed above ma(50) ,1) }
set{a3, count(close crossed above ma(100) ,1) }
set{a4, count(close crossed above ma(200) ,1) }
set{b1, a1 * 1000}
set{b2, a2 * 100}
set{b3, a3 * 10}
set{c1, b1 + b2}
set{c2, c1 + b3}
set{c3, c2 + a4}
add column c3 {ma_xover}
sort column 5 descending
c3 above 0

Of course, add your own price and volume criteria!!

The ma_xover column can be sorted to show you stocks that most recently crossed over the ma20, then ma50, etc..

You can change the "crossed above" to "closed above" and then add the line "and c3 = 1111" to get stocks that are above all 4 moving averages!

You can do a lot with this filter now.

For the record, my good buddy, CEGIS, helped me with this "secret code " a long time ago.


805 posts
msg #35912
Ignore marine2
5/6/2005 2:10:05 AM

To thin the filtered list down from what TheRumpledOne's filter gives you, you would perhaps add these extra lines to his filter:

and slow stochastic %D is below 20 previous 1 day
and price is between .25 to 10
and cci(14) is below 0
and price increasing previous 2 days

Of course you can always adjust the price of stock your after (example: 1 to 50 etc). Those lines I just showed you will significantly thin the stock picks down for you.

Goodluck and happy investing.

6,358 posts
msg #35930
Ignore TheRumpledOne
5/7/2005 3:03:39 PM


You missed the point of the filter and thread completely!!

The whole idea with the C3 display column/variable is that you can sort on it and pick the stocks you want MANUALLY OR you can specify C3 = 1111 and get nothing but stocks that crossed over all 4 moving averages.

Adding other code DILUTES the filter.

Plus you can apply this filter to a WATCH LIST and track the movement of your favorites.

The point of this thread was to search for moving average crossovers!

1 posts
msg #35948
Ignore hchou
5/8/2005 11:52:37 PM

Thank you TheRumpleDone and Marine2.

I didn't quite get TheRumpleDone's filters. I am too new. I tried it and it's not what I am looking for.

What I am looking for is that MA(20), MA(50), MA(100), and MA(200) intersecting each other within X days (let's say last 5 days). I don't care which one is up or down as long as they are coming together recently. But I would like the current values of MAs to be within X percent of each other (let's say 3%).

Thank you for your help.


805 posts
msg #35974
Ignore marine2
5/12/2005 1:04:55 AM

TheRumpledOne, watered down or thinned out so myself and others wont have so many to choose from and becoming confused on just which one to choose from was my purpose. Again, you state your reasoning and I state mine. Let the forum members make their choice. No, Rump, you don't need to respond to this. Yes, Rump, like you always say, it's not the stock that is important but how you trade it.

Happy investing and sure make some money too!

6,358 posts
msg #35986
Ignore TheRumpledOne
5/12/2005 11:17:01 PM

Marine, I understand what you mean.

However, when you sort the ma trend column the better candidates pop to the top.

So rather than limiting the picks, the filter allows the user the flexibility to sort.

One point, I download the results to Excel because I can sort on 3 columns as opposed to one.


805 posts
msg #35988
Ignore marine2
5/13/2005 2:15:16 AM

Thanks Rump for the reply. You do have a great process there. It does show you the most encouraging ones. The more you work with these tools more keeps bubbling out and making things even better.

235 posts
msg #36012
Ignore cegis
5/16/2005 3:16:45 PM


Do you realize that you are ALREADY sorting on *FOUR* columns (a1, a2, a3, and a4) when you sort on c3?

As long as your nested set{}s don't go too deep, you can sort on as many columns as you want (in theory), using the same basic method. You can even mix ascending and descending sorting between the columns. Here's an example (to show the technique, not that this is a very usable filter in and of itself...):

set{ccccc, close / 100} /* range 0 to .99999 */
set{ppp, 999 - pe} /* range 999 down to 0 */
set{ppppp, ppp * 100}
set{x000, count(ma(10) crossed above ma(30),1) * 100000}
set{pppppccccc, ppppp + ccccc}
set{xpppppccccc, pppppccccc + x000}

price less than 100
and pe less than 1000
and volume 30 day low is greater than 1000000

add column xpppppccccc
add column x000 /* should be ascending */
add column pe /* should be DEscending within x */
add column ppp
add column close /* should be ascending (within x/ppp) */
add column ccccc

sort column 5 ascending

(Note: I divided the close by 100 because SF was having issues with large numbers. I wanted to use xpppppccccc, not xppppp.ccccc, but this still works...)



6,358 posts
msg #36014
Ignore TheRumpledOne
5/16/2005 8:11:28 PM I know that about c3!!

StockFetcher Forums · Filter Exchange · How To Search for MA(20), MA(50), MA(100), MA(200) Cross Over<< 1 2 >>Post Follow-up

*** Disclaimer *** does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. does not recommend particular securities., Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.

Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus