Marco Sicily 20 posts msg #136196 - Ignore Marco Sicily |
6/5/2017 7:35:14 PM
Hello Everyone,
I'm interested in a work around for the SF limitations using the Count feature. I know that SF does not support using 2 or more criteria in a "Count" filter phrase but I'm thinking someone out there has devised a workaround solution.
I am trying to count how many times in the last 100 days a specific symbol has had both the high of the day be > 0.50% above the open and the low of the day be > 0.50% below the open. It's easy enough to code to discern how many times either criteria been met but I haven't been able to develop code to see how many days that both the high and low criteria are met.
Thanks in advance for your help.
Marco
|
four 5,087 posts msg #136198 - Ignore four |
6/5/2017 7:49:46 PM
Take a look here:
http://www.stockfetcher.com/forums2/General-Discussion/and-in-count-function/83330/-1/83332
|
Marco Sicily 20 posts msg #136199 - Ignore Marco Sicily |
6/5/2017 10:48:48 PM
Thanks "four" for your help ! I had previously reviewed that post and it seems to explain how to code to find out if two conditions are met. What I can't figure out is how to then discern how many times in 100 days that both conditions were met. That is what I am most interested in. I didn't see in Kevin's or TRO's code that answer but maybe I'm missing something obvious.
These two lines of my code tell me how many times each condition was met in the last 100 days:
add column count(high more than .50 percent above open, 100) { high >.50% above open}
add column count(low more than .50 percent below open, 100) {Low > .50% below open}
Now I need to figure out how to find out how many days in the last 100 days that both conditions were met on the same day.
|
four 5,087 posts msg #136200 - Ignore four modified |
6/5/2017 11:38:42 PM
Perhaps an example to work with...
|
four 5,087 posts msg #136201 - Ignore four modified |
6/5/2017 11:56:57 PM
Click on image to zoom [new window will open]
This chart area in color shows all false... conditions are not met... no "boxes" are drawn
Close and Open below ma(10) for these days... all set statements return 0
|