StockFetcher Forums · Filter Exchange · need help with filter to present total gap amount in pct<< 1 2 >>Post Follow-up
guspenskiy13
976 posts
msg #119243
Ignore guspenskiy13
modified
4/28/2014 9:01:05 PM

I was looking at this filter of TRO and tried to tweak it to show the total PCT amount of gap ups and downs...

I appreciate if someone could help me with this...no luck

Fetcher[
/* Overnight vs Daily performance NIGHT CRAWLERS */

set{ opcl1, open - close 1 day ago }
set{ clop, close - open }
set{ hiop, high - open }
set{ oplo, open - low }
set{ locl, close - low }

set{ nightup, count( opcl1 above 0, 100) }
set{ dayup, count( clop above 0, 100) }

set{chgn, sum( opcl1 ,5)}
set{chgd, sum( clop ,5)}

set{chgn100, sum( opcl1 ,100)}
set{chgd100, sum( clop ,100)}
set{hiop100, sum( hiop ,100)}
set{oplo100, sum( oplo ,100)}
set{locl100, sum( locl ,100)}

/* DISPLAY COLUMNS */

and add column nightup
and add column dayup
and add column opcl1
and add column clop
add column chgn100
add column chgd100
add column hiop100
add column oplo100
add column locl100

and add column separator
/* SELECTION CRITERIA */

nightup above 60
average volume(90) above 1000000

/* SORT CRITERIA */

SORT COLUMN 5 DESCENDING
]



mahkoh
1,065 posts
msg #119249
Ignore mahkoh
4/29/2014 5:11:40 AM

Fetcher[

/* Overnight vs Daily performance NIGHT CRAWLERS */

set{ aopcl1, open - close 1 day ago }
set{ opcl1a, aopcl1 / close 1 day ago }
set{opcl1,opcl1a * 100}
set{ aclop, close - open }
set{ clopa, aclop / close 1 day ago }
set{clop,clopa * 100}
set{ ahiop, high - open }
set{ hiopa, ahiop / close 1 day ago }
set{hiop,hiopa * 100}
set{ aoplo, open - low }
set{ oploa, aoplo / close 1 day ago }
set{oplo,oploa * 100}
set{ alocl, close - low }
set{ locla, alocl / close 1 day ago }
set{locl,locla * 100}
set{ nightup, count( opcl1 above 0, 100) }
set{ dayup, count( clop above 0, 100) }

set{chgn, sum( opcl1 ,5)}
set{chgd, sum( clop ,5)}

set{chgn100, sum( opcl1 ,100)}
set{chgd100, sum( clop ,100)}
set{hiop100, sum( hiop ,100)}
set{oplo100, sum( oplo ,100)}
set{locl100, sum( locl ,100)}

/* DISPLAY COLUMNS */

and add column nightup
and add column dayup
and add column opcl1
and add column clop
add column chgn100
add column chgd100
add column hiop100
add column oplo100
add column locl100

and add column separator
/* SELECTION CRITERIA */

nightup above 60
average volume(90) above 1000000

/* SORT CRITERIA */

SORT COLUMN 5 DESCENDING
]



guspenskiy13
976 posts
msg #119258
Ignore guspenskiy13
modified
4/29/2014 1:19:50 PM

Thank you mankoh,

I appreciate it, much better now.

But is it possible to have one column for the sum of gap ups in pct (positive only) and another for the sum of gap downs in pct (negative only)?

Thanks again!

P.S.

I feel bad for asking for too much, but if it's possible to present separately PCT of gap ups, PCT of gap downs and PCT of UNFILLED gap downs...that would be just amazing..

mahkoh
1,065 posts
msg #119261
Ignore mahkoh
4/29/2014 4:34:47 PM

Just change "open - close 1 day ago" to close 1 day ago - open" and you'll get overnight gap downs.

For gapfill statistics check TRO's filter

http://www.stockfetcher.com/forums/Filter-Exchange/FADING-THE-GAP-STATISTICS-FILTER/45054

guspenskiy13
976 posts
msg #119264
Ignore guspenskiy13
4/29/2014 6:26:08 PM

Yes, I got that, this filter is based on the tro's gap filter.


My problem is that when I do this:

set{chgn100, sum( opcl1 ,1)}

I get BOTH PCT in there, whether it's a GAP UP or GAP DOWN.

As the result, for 100 days I get a number that represents this: (100_day_gap_UP_PCT - 100_day_gap_DOWN_PCT).

I am trying to make it in a way, so I have a SEPARATE SUM for all GAP UPS and a SEPARATE SUM for all GAP DOWNS; and hopefully only for UNFILLED GAP DOWNS.
_____________

I can't separate the PERCENTAGE of UP gaps from DOWN gaps in "CHGN100"....that's a big issue.




guspenskiy13
976 posts
msg #119359
Ignore guspenskiy13
5/5/2014 5:35:38 PM

UP: Anyone could help?

Marco Sicily
20 posts
msg #120744
Ignore Marco Sicily
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
]



bert123
53 posts
msg #120754
Ignore bert123
6/15/2014 8:22:03 PM

Marco,
Is it possible for you to revise the filter you posted to show the net average of the gap ups and the average of the gap downs independently in either a net amount or percentage?
For example, Stock ABC gapped up 54 times out of the last 100 days and the average gap up was .20 cents or .5%.
Stock ABC gapped down 46 times out of the last 100 days and the average gap down was .10 cents or .25%
Thanks in advance

Marco Sicily
20 posts
msg #120774
Ignore Marco Sicily
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
]




bert123
53 posts
msg #120776
Ignore bert123
6/16/2014 6:13:10 PM

Marco,

Thanks for responding and for the additions to the filter. However, I may not have made myself clear on what I was looking for.
But, before getting to that I wanted to add to what you said about Kevin and The Rumpled One - I couldn't agree with you more. They have been great teachers and contributors to this site and I can't thank them enough for all they've given to me and the entire Stockfetcher community.

Regarding the filter and looking at today's results, we have two symbols both who have gapped up 70 times and gapped down 27 times. Which is the better play? What I would like to know is the Average of the GAP UPS and average of the GAP DOWNS.

HYPOTHETICAL example;

VHT - GAP UP AVERAGE 50 cents, GAP DOWN AVERAGE 25 cents.
NYLD - GAP UP AVERAGE 40 cents, GAP DOWN AVERAGE 30 cents.

Both of the above gapped up 70 times and gapped down 27 times. Which is the better play?

Looking at the detail, clearly VHT would be the better play.

I hope that this explains what I am looking for and thanks in advance for the help.

StockFetcher Forums · Filter Exchange · need help with filter to present total gap amount in pct<< 1 2 >>Post Follow-up

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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.