DrJimO 35 posts msg #125127 - Ignore DrJimO |
9/21/2015 7:25:13 PM
Is there a way to write a filter (say for 30 days) that would return stocks with a low bollinger differential for a period of 30 to 27 days BEFORE the day the filter is run? -- The idea would be to pick up an expansion in the last couple of days.
I've looked at numerous bollinger filters posted here, and can't seem to find any that will run for a selected number of days in the past. It would seem SF is capable of this, I just can't figure out how to code it.
All help appreciated ........... Jim
|
four 5,087 posts msg #125131 - Ignore four modified |
9/21/2015 10:41:04 PM
http://www.stockfetcher.com/forums/Indicators/Bollinger-Width/122
|
Mactheriverrat 3,156 posts msg #125136 - Ignore Mactheriverrat |
9/21/2015 11:28:56 PM
Sorry but I just had to added the EMA(20) this this filter to show the real trend up or down.
Submit
|
four 5,087 posts msg #125140 - Ignore four |
9/21/2015 11:48:27 PM
ema(20) turns this into a filter for shorting :(
hmmmm...
|
DrJimO 35 posts msg #125159 - Ignore DrJimO |
9/22/2015 11:15:22 AM
Four -
Unless I am missing the boat, this just tells me what the Bollinger width was 5 days ago. I'm looking for the bollinger width being less than some number for every day a period of xx to yy days ago. I could probably do this with a number of lines, like
and Bollinger width 6 days ago
and Bollinger width 7 days ago, etc., etc.
but I'm thinking there must be a better coding solution. Any thoughts?
|
DrJimO 35 posts msg #125169 - Ignore DrJimO |
9/22/2015 4:31:23 PM
I Tried again with filter below, but I don't understand how SF works with this. The differential does not seem to produce expected result and the result seems to be totally unpredicable.
/* 09-22/15 Try 3 -- Bollinger Band consolidation and breakout */
/* Calculate and display price adjusted volume */
set { Adj_Vol, Volume(20) * close(20) }
set { DollarVol, Round(Adj_Vol) }
add column DollarVol { Dollar Volume }
and add column separator
/* Market and Sector information */
and add column exchange {exch}
and add column sector {sect}
and add column industry {Indust}
and add column separator
and add column bollinger diff(20,1.5) {BBdiff }
show stocks where the Bollinger Diff(20,1.5) is less than 0.5 20 days ago
and Bollinger Diff(20,1.5) is less than 0.5 12 days ago
and Bollinger Diff(20,1.5) is less than 0.5 11 days ago
and Bollinger Diff(20,1.5) is less than 0.5 10 days ago
and Bollinger Diff(20,1.5) is less than 0.5 9 days ago
and Bollinger Diff(20,1.5) is less than 0.5 8 days ago
and Bollinger Diff(20,1.5) is less than 0.5 7 days ago
and Bollinger Diff(20,1.5) is less than 0.5 6 days ago
and Bollinger Diff(20,1.5) is less than 0.5 5 days ago
and Bollinger Diff(20,1.5) is less than 0.5 4 days ago
and Bollinger Diff(20,1.5) is less than 0.5 3 days ago
and close has been increasing for the last 2 days
and volume has been increasing for the last 2 days
and ma(10) has been increasing for the last 2 days
and cma(adj_vol, 20) > 400000 and close > 1
and draw ma(30)
and draw Bollinger Bands(20,1.5)
and chart-length is 22 days
and do not draw Adj_Vol
and do not draw cma(adj_vol, 15)
|
DrJimO 35 posts msg #125170 - Ignore DrJimO |
9/22/2015 4:36:21 PM
First bollinger line above should read 13 days ago
|
Mactheriverrat 3,156 posts msg #125175 - Ignore Mactheriverrat |
9/22/2015 7:29:06 PM
IMHO the EMA(20) is a barometer of trends and which way the trend is going
|
DrJimO 35 posts msg #125268 - Ignore DrJimO |
9/25/2015 8:11:07 PM
Anyone have any input on this. I'm still trying to get a working filter. ......... Jim
|
four 5,087 posts msg #125269 - Ignore four modified |
9/25/2015 9:01:02 PM
set{x,count(Bollinger width(20,1.5) < 0.05,4)}
add column x > 3
draw Bollinger width(20,1.5) line at 0.05
|