StockFetcher Forums · Filter Exchange · TRO your help please<< 1 2 >>Post Follow-up
SAFeTRADE
646 posts
msg #50192
Ignore SAFeTRADE
2/23/2007 9:54:44 AM

What math would I employ to figure a confluence of 3 moving averages, say ma(5)
ma(13) and ma(34). It does not really matter what 3 ma's. What I am interested in is when all the stars align say within as close a percentage as possible. I tried substracting all 3 in hopes of getting a zero result or as close to zero as possible. Is there a better way?

Thanks


papawally
19 posts
msg #50193
Ignore papawally
2/23/2007 12:09:58 PM

You could try something like this:
and average volume(30) is above 150000
and close is above 15
and the 30 day slope of the close is above 0
and EMA(3) crossed above EMA(7)
and EMA(7) crossed above EMA(14)
set{diff3n14,EMA(3)-EMA(14)}
and Draw RSI(2)line at 5
and draw diff3n14 line at 0
and draw linear regression line(60)
and add column diff3n14
and Add column EMA(3)
and Add column EMA(7)
and Add column EMA(14)
and Add column RSI(2)
and Chart-time is three month



TheRumpledOne
6,411 posts
msg #50215
Ignore TheRumpledOne
2/24/2007 8:08:22 PM

I wrote a filter for something similiar... try search.


TheRumpledOne
6,411 posts
msg #50218
Ignore TheRumpledOne
modified
2/24/2007 10:05:30 PM

Fetcher[
/* THREE MOVING AVERAGES WITHIN 1 PERCENT OF EACH OTHER */

set{E513b,days(ma(5) is above ma(13),100)}
set{E513a,days(ma(5) is below ma(13),100)}
set{M1X, E513a - E513b}


set{E534b,days(ma(5) is above ma(34),100)}
set{E534a,days(ma(5) is below ma(34),100)}
set{M2X, E534a - E534b}


set{E1334b,days(ma(13) is above ma(34),100)}
set{E1334a,days(ma(13) is below ma(34),100)}
set{M3X, E1334a - E1334b}

set{diff1, abs(ma(5) minus ma(13) )}
set{diff2, abs(ma(13) minus ma(34) )}
set{diff3, abs(ma(5) minus ma(34) )}

/* change .01 to whatever percent you want */
set{pctdiff, close * .01}

add column diff1
add column diff2
add column diff3
add column pctdiff

add column SEPARATOR

add column M1X
add column M2X
add column M3X

diff1 below pctdiff
diff2 below pctdiff
diff3 below pctdiff

DRAW MA(5)
DRAW MA(13)
DRAW MA(34)

close above 20
volume above 1000000

sort column 5 ascending
]



PCTDIFF is the maximum amount the MAs can differ - default is 1% of the closing price.

DIFF1, DIFF2 and DIFF3 is the absolute value of the close minus the moving averages.

M1X, M2X, M3X are the days since the moving averages crossed.

HTH.





TheRumpledOne
6,411 posts
msg #50219
Ignore TheRumpledOne
modified
2/24/2007 10:11:30 PM

Fetcher[

/* THREE MOVING AVERAGES WITHIN .20 OF EACH OTHER */

set{E513b,days(ma(5) is above ma(13),100)}
set{E513a,days(ma(5) is below ma(13),100)}
set{M1X, E513a - E513b}


set{E534b,days(ma(5) is above ma(34),100)}
set{E534a,days(ma(5) is below ma(34),100)}
set{M2X, E534a - E534b}


set{E1334b,days(ma(13) is above ma(34),100)}
set{E1334a,days(ma(13) is below ma(34),100)}
set{M3X, E1334a - E1334b}

set{diff1, abs(ma(5) minus ma(13) )}
set{diff2, abs(ma(13) minus ma(34) )}
set{diff3, abs(ma(5) minus ma(34) )}



add column diff1
add column diff2
add column diff3
add column pctdiff

add column SEPARATOR

add column M1X
add column M2X
add column M3X

/* change .21 to whatever you want */

diff1 below .21
diff2 below .21
diff3 below .21

DRAW MA(5)
DRAW MA(13)
DRAW MA(34)

close above 20
volume above 1000000

sort column 5 ascending
]




Rather than using a percentage, you can just specify a fixed amount.

HTH.



SAFeTRADE
646 posts
msg #50225
Ignore SAFeTRADE
2/25/2007 10:14:51 AM

Thanks TRO, exactly what I was looking for.


TheRumpledOne
6,411 posts
msg #50229
Ignore TheRumpledOne
2/25/2007 12:04:42 PM

Hey SAFeTRADE:

Please post your version of the filter.




SAFeTRADE
646 posts
msg #50232
Ignore SAFeTRADE
2/25/2007 2:53:20 PM

It is as follows:

Fetcher[set{sub1, ma(5) + ma(13)}
set{sub2, ma(34) + sub1}
set{subt, sub2 / 3}
set{m5, ma(5) / subt}
set{m13, ma(13) / subt}
set{m34, ma(34) / subt}

high reached a new 52 week high in the last 1 day
close between 5 and 12
volume > 500000

draw m5 on plot m13
draw m34 on plot m13
draw macd
draw rsi(2) on plot rsi(5)

add column m5
add column m13
add column m34
draw ma(5)
draw ma(13)
draw ma(34)
]



Thanks for your input.


TheRumpledOne
6,411 posts
msg #50233
Ignore TheRumpledOne
2/25/2007 3:42:59 PM

Your version is a lot different from what you asked for... unless I didn't understand the request.


SAFeTRADE
646 posts
msg #50235
Ignore SAFeTRADE
2/25/2007 3:52:52 PM

Makes a difference when you know what you want to do. I had no clue
of where I wanted to start or end up. The idea is similiar to the on in the book The Art of Low Risk Investing by Michael G. Zahorchak. Not necessarily the same averages. The idea remains the same where the 3 averages converge and the buy is between the upper and lower averages. Supposedly a safer trade. Hence the reason for your expertice.

Thanks again.


StockFetcher Forums · Filter Exchange · TRO your help please<< 1 2 >>Post Follow-up

*** Disclaimer *** StockFetcher.com 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. StockFetcher.com does not recommend particular securities. StockFetcher.com, 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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.