StockFetcher Forums · Filter Exchange · /* Punching through the top trend line */<< >>Post Follow-up
TheRumpledOne
6,407 posts
msg #37734
Ignore TheRumpledOne
8/31/2005 12:13:34 AM

Fetcher[
/* Punching through the top trend line */

set{LL, count(low equal low 20 day low, 20)}

set{NewLo, count(low below low 1 day ago, 20)}

set{LH, count(high below high 1 day ago, 20)}

add column LL

add column NewLo

add column LH

LL above 0

high 1 day ago equal high 20 day low 1 day ago

CLOSE above high 1 day ago

volume above 1000000
close above 20

sort column 5 descending
]



Another "old school" filter.

MAY ALL YOUR FILLS BE COMPLETE.




TheRumpledOne
6,407 posts
msg #37751
Ignore TheRumpledOne
9/1/2005 12:02:45 AM

Fetcher[

/* Punching through the top trend line */

set{LL, count(low equal low 20 day low, 20)}

set{NewLo, count(low below low 1 day ago, 20)}

set{LH, count(high below high 1 day ago, 20)}

add column LL

add column NewLo

add column LH

LL above 0

high 1 day ago equal high 20 day low 1 day ago

CLOSE above high 1 day ago

volume above 1000000
close above 20

sort column 5 descending
/* NORMALIZE accumulation distribution */

set{adval, INDPOSITION(accumulation distribution, 60) }

/* NORMALIZE momentum(12) */

set{moval, INDPOSITION(momentum(12), 60) }

/* NORMALIZE rsi(2) */

set{rsval, RSI(2) }

/* NORMALIZE williams %r(10) */

set{wrval, INDPOSITION(williams %r(10), 60) }


add column wrval
add column adval
add column rsval
add column moval


/* VOLUME CALCULATIONS */
set{v, volume 1 day ago}
set{volinc, volume - v}
set{volpc, volinc / v}
set{volpct, volpc * 100}

set{VolZ, days(volume < 1,100)}
set{VolUp, days(volume is below volume 1 day ago,100)}
set{VolDn, days(volume is above volume 1 day ago,100)}
set{VlXvl, VolUp - VolDn}

set{vck1, volume 1 day ago }
set{vck, volume / vck1 }
set{vdbl, days(vck < 2, 100)}

and add column VlXvl
and add column Vdbl
and add column volpct

]



SOMEBODY NEEDS TO BACKTEST THIS.


TheRumpledOne
6,407 posts
msg #37761
Ignore TheRumpledOne
9/1/2005 5:17:57 PM

Fetcher[
/* MULTIPLE TRENDS Punching through the top "trend" line */

/* count how many times the low was the 10 day low over the past 10 days */
set{LL10, count(low equal low 10 day low, 10)}


/* count times the low was below previous low over the past 10 days */
set{NewLo10, count(low below low 1 day ago, 10)}


/* count times the high was below previous high over the past 10 days */
set{LH10, count(high below high 1 day ago, 10)}


/* yesterday's high was the lowest high and at least 2 ten day lows */
set{BK10, count(high 1 day ago equal high 10 day low 1 day ago,1) * count(LL10 above 1, 1)}

set{LL20, count(low equal low 20 day low, 20)}

set{NewLo20, count(low below low 1 day ago, 20)}

set{LH20, count(high below high 1 day ago, 20)}

set{BK20, count(high 1 day ago equal high 20 day low 1 day ago,1) * count(LL20 above 1, 1)}


set{LL60, count(low equal low 60 day low, 60)}

set{NewLo60, count(low below low 1 day ago, 60)}

set{LH60, count(high below high 1 day ago, 60)}


set{BK60, count(high 1 day ago equal high 60 day low 1 day ago,1) * count(LL60
above 1, 1)}

/* TREND CALCULATIONS */
set{T10, count(10 day slope of the close above 0,1)}
set{T60, count(60 day slope of the close above 0,1)}
set{T200, count(200 day slope of the close above 0,1)}

Set{u1, T200 * 1}
Set{u2, T60 * 10}
Set{u3, T10 * 100}

Set{uu, u1 + u2}
Set{TREND, uu + u3}


set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{ClxCl, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{ClxE5, E5a - E5b}

add column BK10
add column BK20
add column BK60

add column trend
add column ClxCl
add column ClxE5

/* columns below used to test the filter and are commented out
add column LL10
add column NewLo10
add column LH10

add column LL20
add column NewLo20
add column LH20

add column LL60
add column NewLo60
add column LH60

columns above used to test the filter and are commented out */


/* SELECT 20 DAY BREAK OUTS */

BK20 ABOVE 0
CLOSE above high 1 day ago

/* PRICE AND VOLUME SELECTION */

close above 20
volume above 1000000

sort column 5 descending

/* NORMALIZE accumulation distribution */

set{adval, INDPOSITION(accumulation distribution, 60) }

/* NORMALIZE momentum(12) */

set{moval, INDPOSITION(momentum(12), 60) }

/* NORMALIZE rsi(2) */

set{rsval, RSI(2) }

/* NORMALIZE williams %r(10) */

set{wrval, INDPOSITION(williams %r(10), 60) }


add column wrval
add column adval
add column rsval
add column moval


/* VOLUME CALCULATIONS */
set{v, volume 1 day ago}
set{volinc, volume - v}
set{volpc, volinc / v}
set{volpct, volpc * 100}

set{VolZ, days(volume < 1,100)}
set{VolUp, days(volume is below volume 1 day ago,100)}
set{VolDn, days(volume is above volume 1 day ago,100)}
set{VlXvl, VolUp - VolDn}

set{vck1, volume 1 day ago }
set{vck, volume / vck1 }
set{vdbl, days(vck < 2, 100)}

and add column VlXvl
and add column Vdbl
and add column volpct
]



This filter finds stocks breaking out of "trends".

The filter looks for the lowest high of the period and when the close closes about it, that's a "breakout".

MAY ALL YOUR FILLS BE COMPLETE.



__fetcheruser123
msg #46534
Ignore __fetcheruser123
8/22/2006 12:51:09 PM

Wasn't sure what kind of backtesting parameters to use so I just left them at their defaults.

Approach Information
Approach Name: /* Punching through the top trend line */ set...
Test started on 08/20/2004 ended on 08/21/2006, covering 504 days
Filter used:

/* Punching through the top trend line */

set{LL, count(low equal low 20 day low, 20)}

set{NewLo, count(low below low 1 day ago, 20)}

set{LH, count(high below high 1 day ago, 20)}

add column LL

add column NewLo

add column LH

LL above 0

high 1 day ago equal high 20 day low 1 day ago

CLOSE above high 1 day ago

volume above 1000000
close above 20

sort column 5 descending
/* NORMALIZE accumulation distribution */

set{adval, INDPOSITION(accumulation distribution, 60) }

/* NORMALIZE momentum(12) */

set{moval, INDPOSITION(momentum(12), 60) }

/* NORMALIZE rsi(2) */

set{rsval, RSI(2) }

/* NORMALIZE williams %r(10) */

set{wrval, INDPOSITION(williams %r(10), 60) }


add column wrval
add column adval
add column rsval
add column moval


/* VOLUME CALCULATIONS */
set{v, volume 1 day ago}
set{volinc, volume - v}
set{volpc, volinc / v}
set{volpct, volpc * 100}

set{VolZ, days(volume < 1,100)}
set{VolUp, days(volume is below volume 1 day ago,100)}
set{VolDn, days(volume is above volume 1 day ago,100)}
set{VlXvl, VolUp - VolDn}

set{vck1, volume 1 day ago }
set{vck, volume / vck1 }
set{vdbl, days(vck < 2, 100)}

and add column VlXvl
and add column Vdbl
and add column volpct


Trade Statistics
There were 4110 total stocks entered. Of those, 3932 or 95.67% were complete and 178 or 4.33% were open.
Of the 3932 completed trades, 2098 trades or 53.36%resulted in a net gain.
Your average net change for completed trades was: 0.59%.
The average draw down of your approach was: -5.75%.
The average max profit of your approach was: 6.07%
The Reward/Risk ratio for this approach is: 1.19
Annualized Return on Investment (ROI): 7.81%, the ROI of ^SPX was: 9.26%.

Exit Statistics
Stop Loss was triggered 859 times or 21.85% of the time.
Stop Profit was triggered 1026 times or 26.09% of the time.
Trailing Stop Loss was triggered 0 times or 0.00% of the time.
You held for the maximum period of time (25 days) 2047 times or 52.06% of the time.
An exit trigger was executed 0 times or 0.00% of the time.

Statistics By Holding Period
 Completed2 day chg5 day chg10 day chg25 day chg40 day chg
Winners:209820092075208420642053
Losers:182920781978194417881676
Win/Loss Ratio:1.15:10.97:11.05:11.07:11.15:11.23:1
Net Change:0.59%-0.06%0.05%0.14%0.85%1.41%

Statistics By Variable: Match Price
 <300<600<900<1200<1500<1800<2100<2400<2700<3000
Completed2092:18252:1------1:03:3
2 day chg2005:20711:3------0:13:3
5 day chg2068:19742:2------0:15:1
10 day chg2077:19403:1------0:14:2
25 day chg2058:17842:1------1:03:3
40 day chg2048:16713:0------1:01:5

Statistics By Variable: Average Volume
 <15.0M<30.0M<45.0M<60.0M<75.0M<90.0M<105.0M<120.0M<135.0M<150.0M
Completed2040:174235:656:56:87:31:43:1--0:1
2 day chg1941:199744:566:58:76:51:42:3-1:00:1
5 day chg2001:190346:559:28:65:62:33:2-1:00:1
10 day chg2016:186139:639:26:97:42:33:2-1:01:0
25 day chg2011:170131:636:55:107:31:43:1--0:1
40 day chg1988:160839:488:36:98:21:43:1--0:1



TheRumpledOne
6,407 posts
msg #46533
Ignore TheRumpledOne
modified
8/22/2006 12:59:45 PM

Fetcher[
/* FOR TRAPPER READY TO PUNCH through the top trend line */

set{HH26w, high 26 week high }

set{HH10d, high 10 day high }
set{HH05d, high 3 day high }

set{LL, count(low equal low 20 day low, 20)}

set{NewLo, count(low below low 1 day ago, 20)}

set{LH, count(high below high 1 day ago, 20)}

add column HH26w
add column HH05d

add column LL

add column NewLo

add column LH


HH05d below HH26W
close below HH05d

HIGH 1 DAY AGO equal HH05d

Stochastic %K(14,3,3) above Stochastic %K(14,3,3) 1 day ago
Stochastic %D(14,3,3) above Stochastic %D(14,3,3) 1 day ago
Stochastic %K(14,3,3) above 50
Stochastic %D(14,3,3) above 50

PPO(9,15) above 0

/* open equals ind(neng, open) and volume equals ind(neng, volume) */

close is between 1 and 2
volume above 50000


sort column 1 ascending
]






TheRumpledOne
6,407 posts
msg #46535
Ignore TheRumpledOne
8/22/2006 1:00:31 PM

Thanks!


TheRumpledOne
6,407 posts
msg #48345
Ignore TheRumpledOne
12/2/2006 8:09:28 PM

Fetcher[
/* FOR TRAPPER READY TO PUNCH through the top trend line */

set{HH26w, high 26 week high }

set{HH10d, high 10 day high }
set{HH05d, high 3 day high }

set{LL, count(low equal low 20 day low, 20)}

set{NewLo, count(low below low 1 day ago, 20)}

set{LH, count(high below high 1 day ago, 20)}

set{f14, fast stochastic fast %k(14)}
set{f141, fast stochastic fast %k(14) 1 day ago }

set{f14b,days(f14 is above f141, 100)}
set{f14a,days(f14 is below f141, 100)}
set{f14xf14, f14a - f14b}



add column HH26w
add column HH05d

add column LL

add column NewLo

add column LH


add column f14xf14
add column fast stochastic fast %k(14)


HH05d below HH26W
close below HH05d

HIGH 1 DAY AGO equal HH05d

Stochastic %K(14,3,3) above Stochastic %K(14,3,3) 1 day ago
Stochastic %D(14,3,3) above Stochastic %D(14,3,3) 1 day ago
Stochastic %K(14,3,3) above 50
Stochastic %D(14,3,3) above 50

PPO(9,15) above 0

/* open equals ind(neng, open) and volume equals ind(neng, volume) */

close is between 1 and 2
volume above 50000


sort column 1 ascending
]




Added Muddy's ONE LINE FILTER columns.


StockFetcher Forums · Filter Exchange · /* Punching through the top trend line */<< >>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.