StockFetcher Forums · General Discussion · Filter Help<< >>Post Follow-up
lavapit315
47 posts
msg #142209
Ignore lavapit315
modified
2/14/2018 3:18:02 AM

I'm trying to create a simple filter that finds all stocks where at least one of the bollinger bands are inside the keltner channels. I am not getting consistent results and hopefully I can explain what I am seeing and someone can explain why its happening.

Fetcher[apply to symlist (MA,BA,lulu,mu)
and Upper Bollinger Band(20,2) < than Upper Keltner Band(10,1.0) or Lower Bollinger Band(20,2) > than Lower Keltner Band(10,1.0)
sort by volume
and draw Upper Bollinger Band(20,2)
and draw Lower Bollinger Band(20,2)
and draw Upper Keltner Band(10,1.0)
and draw Lower Keltner Band(10,1.0)
and add column Lower Keltner Band(10,1.0) {Lower Keltner}
and add column Bollinger (20,2.0) {Lower Bollinger}
]


Now if I remove the "and Upper Bollinger Band(20,2) < than Upper Keltner Band(10,1.0) or Lower Bollinger Band(20,2) > than Lower Keltner Band(10,1.0)" portion to just show the symlist MU value for lower BB is greater than Lower Keltner so why isn't it showing in previous filter also?

Thanks for any assistance you can give. Also I just noticed something else and it appears that the "or" is not working properly.

Another edit as I found this but have no idea how to implement it.
/* OR Implementation */
/* by definition OR is TRUE IF A is TRUE, B is TRUE, or A AND B is TRUE*/
/* THEREFORE by counting and adding, if the sum is greater than 0 the OR condition is TRUE. */
/* Copyright 2003 by Avery T. Horton, Jr. */
/* Permission to use OR Implementation withing StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/
set{A, count(close above 100, 1)}
set{B, count(volume above 50,000,000, 1)}
set{OR1, A + B} show stocks where OR1 above 0

lavapit315
47 posts
msg #142210
Ignore lavapit315
2/14/2018 4:02:56 AM

Ok, I think I have it but would like someone to verify that I have it properly or maybe a better way to do it.

Fetcher[ Price > 15

set{A, count(Upper Bollinger Band(20,2) < than Upper Keltner Band(10,1.0), 1)}
set{B, count(Lower Bollinger Band(20,2) > than Lower Keltner Band(10,1.0), 1)}
set{OR1, A + B} show stocks where OR1 above 0

sort by volume
and draw Upper Bollinger Band(20,2)
and draw Lower Bollinger Band(20,2)
and draw Upper Keltner Band(10,1.0)
and draw Lower Keltner Band(10,1.0)
and add column Lower Keltner Band(10,1.0) {Lower Keltner}
and add column Bollinger (20,2.0) {Lower Bollinger}

and add column Upper Keltner Band(10,1.0) {Upper Keltner}
and add column Upper Bollinger Band(20,2) {Upper Bollinger}
]



graftonian
1,089 posts
msg #142218
Ignore graftonian
2/14/2018 9:46:55 AM

Your fix looks good to me.
I tightened the filter a bit using:
"show stocks where OR1 above 1
OR1 1 DAY AGO EQUALS 1
CLOSE > CLOSE 1 DAY AGO
VOLUME > Average Volume(30)"

Interesting idea, keep us posted of any refinements.


sammyn
81 posts
msg #142230
Ignore sammyn
2/14/2018 1:42:55 PM

Interesting.

what if you added in some type of momentum indicator or MFI, to see if money is coming into the squeeze play?

lavapit315
47 posts
msg #142250
Ignore lavapit315
2/15/2018 5:14:09 AM

@graftonian Thanks for your input. I tried adding what you said but it knocked down the total stocks to 1 (FCFS) for today. All I did was copy and paste what you had so maybe theirs more to it than that? I do want to work on narrowing down the selection because the way I have it originally there are over 500.

@sammyn Yes, that was the next step. I was having problems with the "OR" statement so wanted to get that working before adding any other variables.

StockFetcher Forums · General Discussion · Filter Help<< >>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.