StockFetcher Forums · View by Author: (120 messages)  [ Display By: Date / Subject ]<< 1 ... 5 6 7 8 9 ... 12 >> 
Filter Exchange · Making an ETF ladder
JoeyVinyl
msg #151684
modified
4/3/2020 3:20:53 PM

For anyone not familiar with the concept of a CD ladder (Certificate of Deposit), let's say you take $10,000 and divide it into five piles of $2,000 each. You use those piles to buy five CD's with different lengths. A 1 year, a 2 year, a 3 year, etc. so you end up with a CD that comes to term every year for the next five years. When the first four come to term you use that money to buy another 5 year CD. Now you have five 5 year CD's with one coming to term every year. Personally I never had enough money to do this and get a decent rate of return. For some people, however, this is a nice safe investment.

But we're not here for safe investments, are we? No, we don't want to take crazy risks either. That's why we're using filters and indicators and some degree of technical analysis. None of them are perfect; none of them work all the time. These days, with the market going up, down, and sideways - usually within the same hour - none of my filters are helping me much, if at all. One of the obvious ways to reduce risk right now is to stay out of the market, but it's just as obvious that means no profit either. Another way is to buy ETFs instead of individual stocks. I decided to stick with the commission free ETFs offered by my broker and make an ETF ladder, similar to a CD ladder, but with a much shorter time frame.

This filter takes two ideas I've seen here and combines them using multiple time frames. One is the relative strength of the ETF compared to the S&P 500 index; the other is the rate of return. I plan on buying one ETF every week for four weeks, then selling the oldest and buying a new one. I'll be holding them for 28 days so calendar months won't be important here. I have this sorted by the relative strength column so I can find the one that has the best average RS of the last 28 days. Then I look at the average rate of return (ror in this filter) and decide which one I like best. I'll buy it at open on whatever day I start this then sell it at open 28 days later, buying the one I like best from the filter closer to that day. My hope is that by filtering out ones that have an overall negative rate of return that I can at least get some gains from these. We'll see what happens.

As usual with any filters I post here, you are all welcome to use it as is or make changes that make it your own.

Fetcher[market is ETF

set {rs1, relative strength(^INX,7)}
set {rs2, relative strength(^INX,14)}
set {rs3, relative strength(^INX,21)}
set {rs4, relative strength(^INX,28)}
set {rsum1, rs1 + rs2}
set {rsum2, rs3 + rs4}
set {rsum3, rsum1 + rsum2}
set {rsavg, rsum3 / 4}

set {ror07a, close - close 7 days ago}
set {ror07b, ror07a / close}
set {07day, ror07b * 100}

set {ror14a, close - close 14 days ago}
set {ror14b, ror14a / close}
set {14day, ror14b * 100}

set {ror21a, close - close 21 days ago}
set {ror21b, ror21a / close}
set {21day, ror21b * 100}

set {ror28a, close - close 28 days ago}
set {ror28b, ror28a / close}
set {28day, ror28b * 100}

set {avg1, ror07b + ror14b}
set {avg2, ror21b + ror28b}
set {avg3, avg1 + avg2}
set {avg4, avg3 / 4}
set {avgror, avg4 * 100}

close is < 55
rsavg is > 1
avgror is > 0

do not draw rsavg
do not draw avgror
draw ema(14)
draw ema(28)

add column rsavg {rel strength}
add column separator
add column 07day {7d ror}
add column 14day {14d ror}
add column 21day {21d ror}
add column 28day {28d ror}
add column avgror {avg. ror}

sort column 11 descending
]



EDIT: I'm posting an edited version of this filter because I noticed some math errors and corrected them.


General Discussion · Need help writing this filter
JoeyVinyl
msg #151676
modified
4/3/2020 11:38:36 AM

@cocoloco

I apologize. I should have explained it better.

The Relative Strength indicator basically just compares the ratio of the change in price between two stocks. What it shows you is how the stock you're looking at is doing compared to the index (or stock - it doesn't have to be used with an index). The higher the number, the better. I usually put the result in a column. As I understand it, anything over 1 means the stock is doing better than the index, while anything under 1 means it isn't. It doesn't give you an actual RSI number though. So the 20 that I used just compares that ratio over the last 20 days. Has it been doing better than the S&P 500 over the last 20 days or worse? You can make that number anything from 1 to 100. It's just the number of days you want to compare.

I checked out this article here: https://www.investors.com/how-to-invest/investors-corner/a-stock-breakout-specialty-tool-the-relative-strength-line and it looks like this is what they're talking about rather than getting an actual RSI number. The Relative Strength Rating they talk about is something they create from their own database and can't be recreated here.

So, the "relstr" part of this is just a variable name. It's like variables in programming or coding. You can make it whatever you want as long as it isn't a function name. Here are some lines you can use that should help.

set {relstr, relative strength(^SPX,20)} /* Finding the RS compared to the index */
add column relstr /* creates a column called relstr */
relstr > 0 /* useful for sorting out stocks doing worse than the index */

Hope this helps.


General Discussion · What needs to be done now...
JoeyVinyl
msg #151659
4/2/2020 5:43:50 PM

@klynn55
"trump is actually thinking about his tv ratings"

I've been staying out of this argument but I've got to tell you, that is just insane (just part of a long list of insane things). He's acting like people are watching his briefings because they want to be entertained and not because they want information. I honestly can't recall any other president in my lifetime who praised themselves the way this one does. A good leader gives credit to their team when things go well and takes responsibility when they don't go well. We do not have a good leader for president right now.

General Discussion · Need help writing this filter
JoeyVinyl
msg #151654
modified
4/2/2020 10:57:07 AM

@cocoloco

I got this from one of Kevin's filters, I think. You can change the variable name, referenced index, and time frame to whatever you want. I'm not sure if it's what you need, or how to create an RSI from it, but it might help.

set {relstr, relative strength(^SPX,20)}

As for average volume, that's simple.

Average Volume(50) > 100000


General Discussion · How short selling started
JoeyVinyl
msg #151650
4/2/2020 10:25:03 AM

I saw this video this morning and found it amusing. I have no idea how historically accurate it is, but based on the source I think it's probably fairly accurate. Yes, it's from NPR, but it's information, not opinion. I'm only sharing it because I think some of you might be interested.

https://www.npr.org/sections/money/2019/09/10/757932277/video-short-selling-stocks-was-invented-as-revenge

Filter Exchange · Need help, should be simple
JoeyVinyl
msg #151288
3/19/2020 1:00:07 PM

Made clickable and took out extra blank lines.

Fetcher[
chart-type is ohlc
and chart-display is weekly
apply to symlist (ddf,scd,gab,ety,htd,asg,eos,nie,jtd,jce,zf,dnp,usa,sphd,csq,tpz,fei,fen,bui,inf,utg,utf,duk,bhk,qlta,govt,dfp,flc,ztr,mci,kio,hps,pfn,pcm,jps,hyi,hix,ra,ladr,jrs,rnp,rfi,mitt,nrz,cim,bto,mgu,bcv,avk,stk,govt,bpy,upro,td,bmo,spy,ewc)

Show stocks where close is more than 50% below 52 week high

add column Average Day Range(30)
add column annual dividend yield
add column weekly stochastic (14,3,3)%k
and add column sector and add column industry

Set{cntcmadma1abovecmadma7,count( cma(DMA(7,-5),2) > cma(DMA(7,-5),7) ,1)}
draw cntcmadma1abovecmadma7

Set{cntcmadma1abovecmadma7b,count( cma(DMA(7,-5),2)< cma(DMA(7,-5),7) ,1)}

draw cntcmadma1abovecmadma7b

/* AxA is number of consecutive days cma(DMA(7,-5),1) above (+)/below(-) previous cma(DMA(7,-5),8) */
set{AAb,days( cma(DMA(7,-5),2) is above cma(DMA(7,-5),7) ,250)}
set{AAa,days( cma(DMA(7,-5),2) is below cma(DMA(7,-5),7) ,250)}
set{dmax7, AAa - AAb} and add column dmax7 {dma_x_1over7}
do not Draw AxA

Set{cntcmadma7abovecmadma7,count( cma(DMA(7,-5),7) > cma(DMA(7,-5),7) 1day ago,1)}
draw cntcmadma7abovecmadma7

Set{cntcmadma7abovecmadma7b,count( cma(DMA(7,-5),7)< cma(DMA(7,-5),7) 1day ago,1)}

draw cntcmadma7abovecmadma7b

set{E3,dma(7,-5),7)-cma(DMA(7,-5),7) }
set{Fastdma7Longposition, count(E3 > 0,1)}
set{Fastdma7Shortposition, count(E3 < 0,1)}
SET{TRIGGER,0}
draw Fastdma7Longposition on plot
draw Fastdma7Shortposition on plot
draw cma(DMA(7,-5),2)
draw cma(DMA(7,-5),7)

do not draw dma(7,-5),7)
Chart-time is 12 months

set{52wh,high 52-week high}
set{cls,close}
set{var1,52wh - cls}
set{var2,cls / 52wh}
set{var3,var2 - 1}
set{var4,var3 * 100}

add column var1 {52-week high - close}
add column var4 {Percentage difference}

add column high 52-week high
]



Filter Exchange · Attn: FILTER GURUS! WT*!!!
JoeyVinyl
msg #151214
3/13/2020 6:15:19 PM

This is why I'm not a filter guru either. The one thing I didn't include was to screen out stocks that are not lower than the close 30 day ago, so the minus sign on EQUX is because the last close is higher than it was 30 days ago. Stick with Cheese's filter. It's much closer to what you were looking for.

Filter Exchange · Attn: FILTER GURUS! WT*!!!
JoeyVinyl
msg #151207
3/13/2020 3:23:19 PM

Forgot to add that like Cheese, I'm guessing your 10% drop is from the close 30 days ago and not the 30 day high. Doing it from the high gave nothing that was 10% or less of a drop.

Filter Exchange · Attn: FILTER GURUS! WT*!!!
JoeyVinyl
msg #151206
3/13/2020 3:20:57 PM

I don't think there's anything wrong with it. I used more words in mine than either you or Cheese did but got the same results as both of you.

Fetcher[market is not ETF
set {30dp, close 30 days ago}
set {drop, 30dp - close}
set {pct1, drop / 30dp}
set {pct, pct1 * 100}
show stocks where close is > 490
and volume is > 500000
and pct is < 10
add column separator
add column high 30 day high
add column drop
add column pct
sort column 8 ascending
]



Filter Exchange · Quick and dirty 5 day VWAP
JoeyVinyl
msg #151126
3/8/2020 12:00:14 PM

@Cheese

Thank you for the links. The more I learn the more I realize this indicator may not be as useful to me as it can be to day traders, but knowledge is rarely a bad thing.

StockFetcher Forums ·  · << 1 ... 5 6 7 8 9 ... 12 >>

*** 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 2018 - 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.