StockFetcher Forums · General Discussion · Comparing stocks with DOW<< >>Post Follow-up
2 posts
msg #127312
Ignore DaSkippa
2/12/2016 2:47:45 PM

How can I fetch stocks that rise in price on the days the DOW or S&P have up days?

4,224 posts
msg #127319
Ignore four
2/13/2016 3:17:39 PM



spyx = 1 { S & P up }
spyx = 0 { S & P down }

stockx= 1 { up }
stockx= 0 { down }

both = 1 : both had up day
both = 0 : both had down day
divergence = ( 0,1 or 1,0 ) both values are not the same

-- --

set{spyx, count(ind(spy,open) < ind(spy,close),1)}
add column spyx
set{stockx, count(open < close,1)}
add column stockx

4,599 posts
msg #127323
Ignore Kevin_in_GA
2/13/2016 5:42:28 PM

How you code this depends on what you mean by "up" - either the close is above the open, or the close is above the prior day's close. These are two different things, since the markets can gap up or down.

Here is how I would code for BOTH options in the same filter:


set{indexup1, count(ind(DIA, close) above ind(DIA, open),1)}
set{indexup1_252, count(indexup1 above 0.5,252)}
set{stockup1, count(close above open,1)}
set{bothup1, indexup1 * stockup1}
set{bothup1_252, count(bothup1 above 0.5,252)}
set{ratio1, bothup1_252 / indexup1_252}
add column ratio1

set{indexup2, count(ind(DIA, close) above ind(DIA, close) 1 day ago,1)}
set{indexup2_252, count(indexup2 above 0.5,252)}
set{stockup2, count(close above close 1 day ago,1)}
set{bothup2, indexup2 * stockup2}
set{bothup2_252, count(bothup2 above 0.5,252)}
set{ratio2, bothup2_252 / indexup2_252}
add column ratio2
add column corr(dia,252,close)
sort on column 5 descending

Not really sure this is an effective screen for trading, though. Here I am using DIA instead of DOW because this let's you use it intraday if needed.

2 posts
msg #127328
Ignore DaSkippa
2/14/2016 6:15:53 PM

Thanks Four and Kevin.

Your help is exactly what I was looking for. Happy trading.

StockFetcher Forums · General Discussion · Comparing stocks with DOW<< >>Post Follow-up

*** Disclaimer *** 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. does not recommend particular securities., 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