StockFetcher Forums · General Discussion · persistent condition filter?<< >>Post Follow-up
timgrant
6 posts
msg #48062
Ignore timgrant
11/19/2006 10:03:09 PM

I'm trying to figure out if there's a filter or a way of jiggling the filters to look for a relationship between two indicators/measures that persisted over x continuous days y days ago, for instance, where the ma(50) had been above the ma(100) for (at least) 5 days 10 days ago. Trying something like

"show stocks where ma(50) 10 days ago had been above ma(100) 10 days ago for 5 days"

doesn't cut it. I know I could do it with a hammer, write 5 lines giving the relationship 10 days ago, 11 days ago, 12 days ago, etc., but I was hoping for something a little more flexible. Anybody done this?


TheRumpledOne
6,358 posts
msg #48082
Ignore TheRumpledOne
modified
11/20/2006 5:52:26 PM

"show stocks where ma(50) 10 days ago had been above ma(100) 10 days ago for 5 days"

Fetcher[

/* count number of time during the last 5 days that ma50 > ma100 */

set{cond1, count( ma(50) > ma(100) , 5 ) }

/* look at count from 10 days ago.. it must be > 4 */

cond1 10 days ago > 4

/* display the current condition value */

add column cond1

/* plot the MAs on the chart */

draw ma(50)
draw ma(100)

/* sort by the current condition value */

sort column 5 descending
]



HTH.



timgrant
6 posts
msg #48118
Ignore timgrant
11/23/2006 7:04:31 AM

Thanks a lot TRO, it's very much appreciated....


StockFetcher Forums · General Discussion · persistent condition filter?<< >>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 2016 - 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