tech-trader 4 posts msg #97307 - Ignore tech-trader |
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.
|
dangreene 229 posts msg #97308 - Ignore dangreene modified |
11/3/2010 8:27:03 AM
Check to see if this gets you the results you are looking for.
Let us know how you plan to exploit this info ?
|
tech-trader 4 posts msg #97321 - Ignore tech-trader |
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.
|