StockFetcher Forums · Filter Exchange · Niko's MAX (Moving Average Crossover) Filter<< 1 2 3 4 5 ... 7 >>Post Follow-up
nikoschopen
2,824 posts
msg #59543
Ignore nikoschopen
2/8/2008 3:35:17 AM

I must say this one is prolly my all-time favorite directional filter, which I grudgingly reveal here for the first time. Gggrrrrr!
Although it's more or less self-explanatory, I'll be happy to answer any question.

Fetcher[
set{var1, 2 * EMA(9)}
set{var2, cema(ema(9),9)}
set{DEMA, var1 - var2}

set{diff, EMA(17) - MA(18)}
set{MAX, sign(diff)}
set{xUP, count(DEMA crossed above LRI(9),1) * 1}
set{xDOWN, count(DEMA crossed below LRI(9),1) * -1}
set{xBoth, xUP + xDOWN}
set{xOver, 1 - count(xBoth equals 0,1)}
set{BSS, xBoth + MAX}
set{BS, BSS / 2}
xOVER above 0

price above 20
avgvol(17) above 300000

add column separator
add column xBoth{DEMA/LRI}
add column MAX
add column BS{Buy/Sell}
add column separator
add column DEMA{dema(9)}
add column LRI(9){lri(9)}
add column EMA(17)
add column MA(18)

draw DEMA on plot close
draw LRI(9)
draw EMA(17)
draw ma(18)
do not draw xOVER
]



luc1grunt
622 posts
msg #59544
Ignore luc1grunt
2/8/2008 6:58:16 AM

Niko, you ole dog....nice filter.

chetron
2,817 posts
msg #59548
Ignore chetron
2/9/2008 12:54:51 PM

FOR THE STANDARD FOLKS....

NOTED OUT "XOVER > 0" AND ADDED SORT ON XOVER COLUMN. LOOK FOR XOVER > 0'S.

Fetcher[

set{var1,2 * EMA(9)}
set{var2,cema(ema(9),9)}
set{DEMA,var1 - var2}
set{diff,EMA(17) - MA(18)}
set{MAX,sign(diff)}
set{xUP,count(DEMA crossed above LRI(9),1) * 1}
set{xDOWN,count(DEMA crossed below LRI(9),1) * -1}
set{xBoth,xUP + xDOWN}
set{xOver,1 - count(xBoth equals 0,1)}
set{BSS, xBoth + MAX}
set{BS,BSS / 2}

add column xover

/* xOVER above 0 */

add column separator
add column xBoth{DEMA/LRI}
add column MAX
add column BS{Buy/Sell}
add column separator
add column DEMA{dema(9)}
add column LRI(9){lri(9)}
add column EMA(17)
add column MA(18)

draw DEMA on plot close
draw LRI(9)
draw EMA(17)
draw ma(18)


price above 20
avgvol(17) above 300000

SORT COLUMN 5 DESCENDING
]



guru_trader
485 posts
msg #59552
Ignore guru_trader
2/9/2008 6:12:05 PM

Thanks Niko ... what made you decide to post this?

I understand how you feel about posting your "goodies", but it can be very beneficial if others decide to post their thoughts and possible improvements.

nikoschopen
2,824 posts
msg #60046
Ignore nikoschopen
2/28/2008 4:21:44 PM

Here's what I think is an improvement of the above filter. I have since added a couple more bells and whistles, most notably a customized oscillator called "return" (for the lack of a better word). Feel free to enhance the filter as you see fit. I only ask that you share it with the rest of us.

Fetcher[
add column separator
set{OVER, count(TSI(6,3,3) crossed above 0,1) *1}
set{UNDER, count(TSI(6,3,3) crossed below 0,1) * -1}
set{both2, OVER + UNDER}
set{CROSS, 1 - count(both2 equals 0,1)}
CROSS above 0
add column both2{TSI6}

set{var1, 2 * EMA(9)}
set{var2, cema(ema(9),9)}
set{DEMA, var1 - var2}
set{TEMA, T3(7,1)}
set{xUP, count(DEMA crossed above TEMA,1) *1}
set{xDOWN, count(DEMA crossed below TEMA,1) * -1}
set{both, xUP + xDOWN}
set{xOVER, 1 - count(both equals 0,1)}
xOVER above 0
add column both{D2/T3}

price above 20
avgvol(17) above 300000

add column separator
/*close position within a 1-month price range"*/
set{hi1mo,high 1 month high}
set{lo1mo,low 1 month low}
set{cllo1mo,close - lo1mo}
set{hilo1mo,hi1mo - lo1mo}
set{diff1,cllo1mo / hilo1mo}
set{%gain1mo,diff1 * 100}

/*close position within a 2-month price "range"*/
set{hi2mo,high 1 month high 1 month ago}
set{lo2mo,low 1 month low 1 month ago}
set{cllo2mo,close 1 month ago - lo2mo}
set{hilo2mo,hi2mo - lo2mo}
set{diff2,cllo2mo / hilo2mo}
set{%gain2mo,diff2 * 100}

/*close position within a 3-month price "range"*/
set{hi3mo,high 1 month high 2 month ago}
set{lo3mo,low 1 month low 2 month ago}
set{cllo3mo,close 2 months ago - lo3mo}
set{hilo3mo,hi3mo - lo3mo}
set{diff3,cllo3mo / hilo3mo}
set{%gain3mo,diff3 * 100}

/*EMA calc.*/
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}
add column return

draw T3(14,0.5)
draw TEMA on plot price
draw DEMA on plot price
draw TSI(6,3,3)
draw return line at 70
draw return line at 30
do not draw CROSS
do not draw xOVER
]



glgene
616 posts
msg #60049
Ignore glgene
2/28/2008 4:56:27 PM

Niko....Your scripting ability absolutely amazes me. You certainly know how to stretch Stockfetcher! Keep up the good work.

nikoschopen
2,824 posts
msg #60051
Ignore nikoschopen
modified
2/28/2008 5:13:26 PM

Thanks, gene. There are still some inherent limitations that SF needs to address IMHO. For example, if they could implement my grinch requests, you could really rock this place. I don't understand why it's taking them so long to get these two simple features off the ground.

On that note, I ask for everyone to rally to my cause by emailing the SF support to make these features available ASAP.

chetron
2,817 posts
msg #60055
Ignore chetron
2/28/2008 10:44:27 PM

for the standard folks...

Fetcher[

set{OVER,count(TSI(6,3,3) crossed above 0,1) * 1}
SET{VAR92,-1}
set{UNDER,count(TSI(6,3,3) crossed below 0,1) * VAR92}
set{both2,OVER + UNDER}
SET{VAR91,COUNT(BOTH2 EQUAL 0,1)}
set{CROSS,1 - VAR91}

set{var1, 2 * EMA(9)}
set{var2, cema(ema(9),9)}
set{DEMA, var1 - var2}
set{TEMA, T3(7,1)}
set{xUP, count(DEMA crossed above TEMA,1) * 1}
set{xDOWN, count(DEMA crossed below TEMA,1) * VAR92}
set{both, xUP + xDOWN}
set{xOVER, 1 - count(both equals 0,1)}

/*close position within a 1-month price range*/

set{hi1mo,high 1 month high}
set{lo1mo,low 1 month low}
set{cllo1mo,close - lo1mo}
set{hilo1mo,hi1mo - lo1mo}
set{diff1,cllo1mo / hilo1mo}
set{%gain1mo,diff1 * 100}

/*close position within a 2-month price range*/
set{hi2mo,high 1 month high 1 month ago}
set{lo2mo,low 1 month low 1 month ago}
set{cllo2mo,close 1 month ago - lo2mo}
set{hilo2mo,hi2mo - lo2mo}
set{diff2,cllo2mo / hilo2mo}
set{%gain2mo,diff2 * 100}

/*close position within a 3-month price range*/
set{hi3mo,high 1 month high 2 month ago}
set{lo3mo,low 1 month low 2 month ago}
set{cllo3mo,close 2 months ago - lo3mo}
set{hilo3mo,hi3mo - lo3mo}
set{diff3,cllo3mo / hilo3mo}
set{%gain3mo,diff3 * 100}

/*EMA calc.*/
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}

ADD COLUMN XOVER
ADD COLUMN CROSS
add column separator
add column return
add column separator
add column both2{TSI6}
add column both{D2/T3}

draw T3(14,0.5)
draw TEMA on plot price
draw DEMA on plot price
draw TSI(6,3,3)

/* eyeball a line at 30 line at 70 on return plot */
draw return

/* XOVER ABOVE 0 EYEBALL THIS TOO */

CROSS above 0
price above 20
avgvol(17) above 300000

SORT COLUMN 5 DESCENDING
]



marine2
963 posts
msg #60056
Ignore marine2
2/29/2008 1:42:13 AM

If you add a nice little divergence line like:

and macd(4,8)fast line crossing above macd(4,8)slow line at close

You will thin out the crop and find some interesting stocks to consider buying. After you run the filter, I usually only consider stocks I have in my watch lists. Those will show up as blue highlighted ones in your filter finds.

nikoschopen
2,824 posts
msg #60057
Ignore nikoschopen
2/29/2008 2:48:39 AM

In case ure interested in what I specifically look for in a chart.



StockFetcher Forums · Filter Exchange · Niko's MAX (Moving Average Crossover) Filter<< 1 2 3 4 5 ... 7 >>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.