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