StockFetcher Forums · View by Author: (20 messages)  [ Display By: Date / Subject ]<< 1 2 >> 
Filter Exchange · How to count when two separate criteria are met?
Marco Sicily
msg #136199
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.

Filter Exchange · How to count when two separate criteria are met?
Marco Sicily
msg #136196
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

Filter Exchange · need help with filter to present total gap amount in pct
Marco Sicily
msg #120777
modified
6/16/2014 7:52:39 PM

Bert

I'm not sure how to code the info you're looking for. I actually developed a spreadsheet in Excel to run those kind of numbers. I download the price history from Yahoo Finance and copy and paste it into my spreadsheet template. Took me a while to get it the way I wanted it but now it is quick and easy and gives me more detailed info as far back as I want to look.

If you want to send me your email address I would be happy to share it with you along with instructions on how to use it.

Marco

General Discussion · Stocks that TREND and do not CONSOLIDATE at 0
Marco Sicily
msg #120775
modified
6/16/2014 4:33:41 PM

You're welcome Klynn.

Thanks go to TRO on this one. He inspired me to try and use more statistical analysis in my trading.

Marco

Filter Exchange · need help with filter to present total gap amount in pct
Marco Sicily
msg #120774
6/16/2014 4:31:50 PM

Bert

Here is TRO's filter revised with the requested info. TRO originally included most of this I just added a few things.

1.) The Avg. Gap,100 column is the Avg. Daily Gap over the last 100 days in Dollars and Cents.

2.) The todaysgap% column is exactly that... Today's gap as a % of the opening price

3.) The Largest and Smallest Gap,100 columns are self explanatory. ( Important for checking for bad ticks or outliers which mess up the average gap %)

Hope this helps... We all owe guys like TRO and Kevin a great deal for their unselfish work.


Marco



Stock
Fetcher[

* gap fill statistics */

set{Xgapped, open - close 1 day ago}
set{Xgapup, count(Xgapped > 0, 1)}
set{Xgapdn, count(Xgapped < 0, 1)}

set{absgap, abs(Xgapped)}

set{gappedup100, count(Xgapup > 0, 100)}
set{gappeddn100, count(Xgapdn > 0, 100)}

set{cl1lo, close 1 day ago - low}
set{hicl1, high - close 1 day ago }

set{fillup, count(cl1lo > 0, 1)}
set{filldn, count(hicl1 > 0, 1)}

set{gapupfilled, Xgapup * fillup }
set{gapdnfilled, Xgapdn * filldn }

set{gapup100f, count(gapupfilled > 0, 100)}
set{gapdn100f, count(gapdnfilled > 0, 100)}

set {%up, gapup100f / gappedup100 }
set {%dn, gapdn100f / gappeddn100 }




set{CCb,days(open is above close 1 day ago,100)}
set{CCa,days(open is below close 1 day ago,100)}
set{CxC, CCa - CCb}

and add column CxC { Gap Up/Down}
/* DRAW PLOTS */

DRAW XGAPPED ON PLOT XGAPPED

/* DISPLAY COLUMNS */

add column separator

and add column gappedup100
and add column gapup100f
add column separator

add column %up
add column separator


and add column gappeddn100
and add column gapdn100f
add column separator

add column %dn
add column separator
and add column cma(absgap,100){Avg. Gap,100}
add column separator

and add column gap (absgap,100){todaysGap%}
add column separator



add column seperator
and add column absgap 100 day high{Largest Gap,100}
add column separator

and add column absgap 100 day low{Smallest Gap,100}
add column separator


/* SELECTION CRITERIA */
and stocks have average volume(90) above 200000
and close is above 2

/* SORT CRITERIA */

SORT COLUMN 7 DESCENDING
]




General Discussion · Stocks that TREND and do not CONSOLIDATE at 0
Marco Sicily
msg #120751
modified
6/15/2014 12:59:17 PM

Frank

Gus was looking for stocks that had litle or no pullback from the open, stocks that breakout and run. This filter measured how many days out of 100 that had a low for the day less than 1/10th of a percent lower than the opening price. Obviously, any stock that does this consistently is a great trade candidate.

Hope this helps.

Marco

Filter Exchange · need help with filter to present total gap amount in pct
Marco Sicily
msg #120744
6/13/2014 8:10:23 PM

Gus

I adapted this from TRO's filter. Measures Gaps Up, Gaps Up Filled and Filled Percentage. Same with Gaps Down.
I also have a column for consecutive Gaps Up/Down. A -3 for example means 3 straight days of a Gap Down, a 5 is 5 straight days of Gap Up. Useful when looking for a mean reversion.

Don't know if you still need this....

Marco

Stock
Fetcher[

* gap fill statistics */

set{Xgapped, open - close 1 day ago}
set{Xgapup, count(Xgapped > 0, 1)}
set{Xgapdn, count(Xgapped < 0, 1)}

set{absgap, abs(Xgapped)}

set{gappedup100, count(Xgapup > 0, 100)}
set{gappeddn100, count(Xgapdn > 0, 100)}

set{cl1lo, close 1 day ago - low}
set{hicl1, high - close 1 day ago }

set{fillup, count(cl1lo > 0, 1)}
set{filldn, count(hicl1 > 0, 1)}

set{gapupfilled, Xgapup * fillup }
set{gapdnfilled, Xgapdn * filldn }

set{gapup100f, count(gapupfilled > 0, 100)}
set{gapdn100f, count(gapdnfilled > 0, 100)}

set {%up, gapup100f / gappedup100 }
set {%dn, gapdn100f / gappeddn100 }




set{CCb,days(open is above close 1 day ago,100)}
set{CCa,days(open is below close 1 day ago,100)}
set{CxC, CCa - CCb}

and add column CxC { Gap Up/Down}
/* DRAW PLOTS */

DRAW XGAPPED ON PLOT XGAPPED

/* DISPLAY COLUMNS */

add column separator

and add column gappedup100
and add column gapup100f
add column separator

add column %up
add column separator


and add column gappeddn100
and add column gapdn100f
add column separator

add column %dn
add column separator
and add column cma(absgap,100)
and add column gap (absgap,100)


and add column avg. gap (absgap,100)
add column separator
and add column absgap 100 day high
add column separator

and add column absgap 100 day low
add column separator


/* SELECTION CRITERIA */
and stocks have average volume(90) above 200000
and close is above 2

/* SORT CRITERIA */

SORT COLUMN 7 DESCENDING
]



General Discussion · Stocks that TREND and do not CONSOLIDATE at 0
Marco Sicily
msg #120634
modified
6/10/2014 7:07:11 PM

Try this ... This will allow you to screen for stocks that have a low less than .10% (1/10 of a percent) below the open. Sort the Daily Low column and see how may times out of a 100 days this happened. Any stock that had a low less than .10% below the open 70% - 80% of the time puts the odds in your favor. I added the 5 day and 1 day to help find high % stocks which have not met the criteria in he last 1-5 days. Obviously if a stock has a low less than .10% below the open 80% of the time but only 1 or 2 days of the last 5 the odds shift heavily in your favor. Many stocks will have very low average day range that meet this criteria. The Average Day Range(90) column can be adjusted to find more volatile stocks. Just add verbiage like... and average day range is above 1%.


Fetcher[

Close is above 1
and average volume(90) is above 200000
add column count(low less than .10 percent below open, 100) {100 Days < .10% }
add column count(low less than .10 percent below open, 5) {5 Days }
add column count(low less than .10 percent below open, 1) {1 Day}
add column average day range(90)



]




General Discussion · New charts ????
Marco Sicily
msg #116503
11/5/2013 7:30:30 PM

Much nicer look to the charts but the drawing tool is not working. I'm using Chrome for the browser. Fix that and I think it is a major upgrade.

Filter Exchange · TRO CROCK POT - SLOW COOKERS FOR SWING TRADERS
Marco Sicily
msg #115825
10/10/2013 10:44:50 PM

If you click on" The Rumpled One" on the first page of this thread it will take you to over 600 pages of TRO's posts.

StockFetcher Forums ·  · << 1 2 >>

*** 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 2018 - 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