StockFetcher Forums · Filter Exchange · Interesting Filter run on the S&P 100<< 1 2 >>Post Follow-up
SAFeTRADE
644 posts
msg #161191
Ignore SAFeTRADE
modified
7/6/2024 3:50:03 PM

Makes you wonder why trade individual stocks when according to this filter 5 of the top names are
ETFs. This run on the s&p 100. Things that make you go hmmmm.

Fetcher[
set{tsa,high 9 day high + low 9 day low}
set{ts,tsa / 2}
draw ts on plot price

set{is-etf,count(market is etf,1)}



set{st13,count(Fast Stochastics Fast %K(13,3) > 80,1)}
set{ts1,st13 * 1000}

set{macd8,count(macd(8,6,8) < 0,1)}
set{ts2,macd8 * 100}

set{macd5,count(macd(5,8,8) > 0,1)}
set{ts3,macd5 * 10}

set{rs8,count(Williams %R(8) > -19,1)}
set{ts4,rs8 * 1}

set{tscore4,ts1 + ts2}
set{tscore3, ts3 + ts4}
set{tscore,tscore4 + tscore3}
set{rank1,count(tscore above 111,1)}
set{rank,rank1 * rsi(8)}
set{buy,count(Fast Stochastics Fast %K(13,3) crossed above 80,1)}


watchlist(snp100)
/*symlist(spy,qqq,dia,xlb,xlc,xle,xlf,xli,xlk,xlp,xlu,xlv,xly,iau,ief,vxx)*/
add column 10 day slope of close
add column 45 day slope of close
add column rsi(8)
/*add column RSquared(close,20){rsq20}*/
add column 45 day slope of close


add column separator
add column tscore
add column buy
add column separator
add column ts1{stoch13}
add column ts2{macd868}
add column ts3{macd588}
add column ts4{w%r8}
add column separator
add column is-etf
add column rank


draw Fast Stochastics Fast %K(13,3)
draw macd(8,6,8)
draw buy
draw Williams %R(8)
draw macd(5,8,8)



draw tscore
sort column 9 descending
]



To see top 10 sort by rank.

push5280
201 posts
msg #161192
Ignore push5280
7/6/2024 7:10:56 PM

The filter is glitching on the rs8 set line

SAFeTRADE
644 posts
msg #161193
Ignore SAFeTRADE
7/7/2024 9:35:51 AM

How so?

snappyfrog
721 posts
msg #161194
Ignore snappyfrog
7/7/2024 9:45:37 AM

It shows a 0 for hits on line 3 "draw ts".
And a warning symbol on the "rs8 count(Williams" line.


snappyfrog
721 posts
msg #161195
Ignore snappyfrog
modified
7/7/2024 9:50:54 AM

I commented out "on plot price" to see if that changed anything on line 3.





SAFeTRADE
644 posts
msg #161196
Ignore SAFeTRADE
7/7/2024 11:16:25 AM

I may be dull this morning but I do not see what you see.

styliten
295 posts
msg #161197
Ignore styliten
modified
7/7/2024 12:28:17 PM

@ SAFeTRADE

seems that

watchlist(snp100)
/*symlist(spy,qqq,dia,xlb,xlc,xle,xlf,xli,xlk,xlp,xlu,xlv,xly,iau,ief,vxx)*/

is the problem area; changing it to:

s&p100

OR

/* watchlist(snp100) */
symlist(spy,qqq,dia,xlb,xlc,xle,xlf,xli,xlk,xlp,xlu,xlv,xly,iau,ief,vxx)

would work but not sure if it works 100% as you've intended or not.

SAFeTRADE
644 posts
msg #161198
Ignore SAFeTRADE
7/7/2024 2:20:53 PM

my watchlist is named snp100.. So as below instead replace my watchlist(snp100) with s&p 100

Fetcher[

set{tsa,high 9 day high + low 9 day low}
set{ts,tsa / 2}
draw ts on plot price

set{is-etf,count(market is etf,1)}



set{st13,count(Fast Stochastics Fast %K(13,3) > 80,1)}
set{ts1,st13 * 1000}

set{macd8,count(macd(8,6,8) < 0,1)}
set{ts2,macd8 * 100}

set{macd5,count(macd(5,8,8) > 0,1)}
set{ts3,macd5 * 10}

set{rs8,count(Williams %R(8) > -19,1)}
set{ts4,rs8 * 1}

set{tscore4,ts1 + ts2}
set{tscore3, ts3 + ts4}
set{tscore,tscore4 + tscore3}
set{rank1,count(tscore above 111,1)}
set{rank,rank1 * rsi(8)}
set{buy,count(Fast Stochastics Fast %K(13,3) crossed above 80,1)}


s&p 100

add column 10 day slope of close
add column 45 day slope of close
add column rsi(8)
/*add column RSquared(close,20){rsq20}*/
add column 45 day slope of close


add column separator
add column tscore
add column buy
add column separator
add column ts1{stoch13}
add column ts2{macd868}
add column ts3{macd588}
add column ts4{w%r8}
add column separator
add column is-etf
add column rank


draw Fast Stochastics Fast %K(13,3)
draw macd(8,6,8)
draw buy
draw Williams %R(8)
draw macd(5,8,8)



draw tscore
sort column 9 descending
]



snappyfrog
721 posts
msg #161199
Ignore snappyfrog
modified
7/7/2024 9:32:38 PM

Now it works. But, no ETFs. I took out the "s&p500" so I could just see ETFs.

schaballa
4 posts
msg #161225
Ignore schaballa
7/12/2024 5:47:00 PM

Hi All, This filter is definitely interesting. I have added my own little twist to this code and back tested it from January 2024 - June 2024. Results have been great as you can back test and see for yourself. I have added some code: Relative Strength and Score, 30-day slope of DMA(200), RSI(2), and RSI(2) 1 day ago, and changed the descending column to buy tickers that come up first.

I have very strict buy rules: TScore must be 1111, Buy is triggered, RSAvg must be 1 or higher, 30 day Slope must be .03 or higher, buy at the end of the day because charts do change throughout the day, and if 2 tickers trigger, buy the one with the most volume.

I am paper trading to see just how this system will work. Please do not take this as advise to get into these trades. I am not a financial advisor and I am just paper trading this system to see if this is something I may add to my swing trading. All of the paper trades below where at Delta 30 so I have continuity.

July 10 DIA 8/16 405 Call 2.39. July 12 high of the day, contract was trading at 4.10
July 10 XLF trigged on Stockfetcher after the market closed. At open, July 11 XLF 8/16 43 Call .41
July 11 XLV 8/16 151 Call .95
July 12 SPY 8/16 572 Call 3.18

Let's see how it goes


Fetcher[
/* Very Strict Buy Rules: 1. TScore 1111 2. Buy triggered 3. RSAvg 1 or higher 4. Slope .03 or higher 5. If 2 or more trigger, always take the most volume 6. Buy at end of day */

set{tsa,high 9 day high + low 9 day low}
set{ts,tsa / 2}
draw ts on plot price

set{is-etf,count(market is etf,1)}

set{st13,count(Fast Stochastics Fast %K(13,3) > 80,1)}
set{ts1,st13 * 1000}

set{macd8,count(macd(8,6,8) < 0,1)}
set{ts2,macd8 * 100}

set{macd5,count(macd(5,8,8) > 0,1)}
set{ts3,macd5 * 10}

set{rs8,count(Williams %R(8) > -19,1)}
set{ts4,rs8 * 1}

set{tscore4,ts1 + ts2}
set{tscore3, ts3 + ts4}
set{tscore,tscore4 + tscore3}
set{rank1,count(tscore above 111,1)}
set{rank,rank1 * rsi(8)}
set{buy,count(Fast Stochastics Fast %K(13,3) crossed above 80,1)}


watchlist(s&p 100)
/*symlist*/
Symlist(spy,qqq,dia,xlb,xlc,xle,xlf,xli,xlk,xlp,xlu,xlv,xly,iau,ief,vxx)

add column 10 day slope of close
add column 45 day slope of close
add column rsi(8)

/*add column RSquared(close,20){rsq20}*/
add column 45 day slope of close

add column separator
add column tscore
add column buy
add column separator
add column ts1{stoch13}
add column ts2{macd868}
add column ts3{macd588}
add column ts4{w%r8}
add column separator
add column is-etf
add column rank

add column rsavg
add column 30-day slope of DMA(200)
add column RSI(2)
add column RSI(2) 1 day ago
do not draw 30-day slope of DMA(200)

/* RELATIVE STRENGTH & SCORE */
set {rs1, relative strength(^INX,28)} /* S&P 500 Index */
set {rs2, relative strength(^DJIA,28)} /* Dow Jones Industrial Average */
set {rs3, relative strength(^RUT,28)} /* Russell 2000 */
set {rs4, relative strength(^IXIC,28)} /* NASDAQ Composite */
set {rsavg1, rs1 + rs2}
set {rsavg2, rs3 + rs4}
set {rsavg3, rsavg1 + rsavg2}
set {rsavg, rsavg3 / 4}


draw Fast Stochastics Fast %K(13,3)
draw macd(8,6,8)
draw buy
draw Williams %R(8)
draw macd(5,8,8)

draw tscore
sort column 10 descending
]



StockFetcher Forums · Filter Exchange · Interesting Filter run on the S&P 100<< 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.