StockFetcher Forums · General Discussion · Counting days with a high/low near yesterday's close << >>Post Follow-up
4 posts
msg #97307
11/3/2010 8:17:50 AM

Looking for any tips on a snippet I'm trying to implement...

I'm trying to count up the number of days that have a high/low near yesterday's close. The obvious solution (snippet below) does not work due to the '1 day ago' being offset in the count operation.

set {S1, count(high near close 1 day ago, 100)}
set {S2, count(low near close 1 day ago, 100)}
set {TOTAL, S1 + S2}

I've tried tried a few different variations of the logic above w/o any luck.

Thanks in advance for any tips.

 dangreene140 postsmsg #97308- Ignore dangreenemodified 11/3/2010 8:27:03 AMCheck to see if this gets you the results you are looking for. Let us know how you plan to exploit this info ? Fetcher[ set {ct1, count(high near close 1 day ago, 100)} set {ct2, count(low near close 1 day ago, 100)} set {TTL, ct1 + ct2} add column ct1 add column ct2 add column ttl ]
4 posts
msg #97321
11/4/2010 6:05:13 AM

Thx for the response.
Turns out my initial fetch code was producing invalid results b/c S1 and S2 are keywords used by SF (thx to SF support team for pointing this out).

The idea here was to calculate an ad-hoc measure of the (horizontal) support strength at a particular level. However after a little more analysis I realize my scheme is not going to work as-is. The reason being is twofold:
a) 'near' equates to within 2% which is too wide of a range IMO
b) the simple scheme I posted will double count days where both the high and low are near the value

I have an idea of how to better calculate what I'm looking for. Unfortunately my idea will utilize variable nesting to the point where I would exceed my performance limitations as a basic member.

Guess I'll have to table this idea until I have time to return to it.

If anyone has already implemented this scheme, any tips are appreciated.

 StockFetcher Forums · General Discussion · Counting days with a high/low near yesterday's close << >>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.