zaq777 19 posts msg #122372 - Ignore zaq777 modified |
12/26/2014 1:21:09 PM
Suppose you want to know when a close is--- for the first time in awhile---above two (or more) different lines that are independent from each other?
For example a close can be above the upper Bollinger band any number of times before it moves above the EMA(150) or it can be the other way around ---- above the upper Bollinger band any number of times before the EMA(150).
But not together until today.
How do I write that?
|
four 5,087 posts msg #122373 - Ignore four modified |
12/26/2014 1:44:06 PM
.Manual for StockFetcher : http://www3.stockfetcher.com/download/sfuserguide2_0.pdf
Here are two ideas working with "something like" you are looking for:
set{x, count(close > upper bollinger band(20,1),10)}
x = 0
draw upper bollinger band(20,1)
close crossed above ema(150)
sp500
/*Today close above both MAs*/
close > ma(21)
close > ma(100)
/*Close below both MAs for the last 10 of 11 days*/
count(close < ma(21),11) > 9
count(close < ma(100),11) > 9
volume > 123123
low > 11
|
mahkoh 1,065 posts msg #122374 - Ignore mahkoh |
12/26/2014 5:32:55 PM
|
zaq777 19 posts msg #122375 - Ignore zaq777 modified |
12/27/2014 5:18:18 PM
Yes that seems to work. Thanks.
Too bad the user guide does such a poor job of explaining how to use the "set" feature or even what it is. I'm can't make any sense of it. Maybe it's just me.
|
mahkoh 1,065 posts msg #122380 - Ignore mahkoh |
12/28/2014 12:31:57 PM
What I did when I started using SF was studying other people's filters and find out what the syntax exactly does. Even today I occasionally browse the forum to look up some code.
There are lots of useful snippets to be copied from filters published by TRO, Chetron and Kevin to name a few.
|
four 5,087 posts msg #142423 - Ignore four |
2/23/2018 3:17:23 PM
pop
|