jaketheguy 52 posts msg #37992 - Ignore jaketheguy |
9/16/2005 3:07:10 AM
***********************
9/13/2005 10:49:15 PM
again...
...I'm trying to isolate a "Measuring Bar" (ie. a day that is a minimum of five days ago) whose High is HIGHER than EITHER the Open OR Close for EACH of the subsequent 4 days...AND...whose Low is LOWER than EITHER the Open OR Close for EACH of the subsequent 4 days. As long as the Open OR Close of the subsequent 4 days falls within the High/Low Range of the "Measuring Bar Day" that's acceptable. Not necessarily looking for "inside days" subsequent to the "Measuring Bar" Day but they DO fit the criteria and are okay. If the High/Low Range of any of the subsequent 4 days is outside the High/Low Range of the "Measuring Day" that's okay too. As long as either the Open OR Close falls within the "Measuring Day" Range that's what I'm wanting.
Thanks again for any help !
alf44
***********************
To get started, the 'brute-force' filter below falls within your constraints (at least as I understand them):
open and close 3 days ago is below high 4 days ago
open and close 3 days ago is above low 4 days ago
open and close 2 days ago is below high 4 days ago
open and close 2 days ago is above low 4 days ago
open and close 1 days ago is below high 4 days ago
open and close 1 days ago is above low 4 days ago
open and close is below high 4 days ago
open and close is above low 4 days ago
|
jaketheguy 52 posts msg #37993 - Ignore jaketheguy |
9/16/2005 3:35:18 AM
To get started, the 'brute-force' filter below falls within your constraints (at least as I understand them):
open and close 3 days ago is below high 4 days ago
open and close 3 days ago is above low 4 days ago
open and close 2 days ago is below high 4 days ago
open and close 2 days ago is above low 4 days ago
open and close 1 days ago is below high 4 days ago
open and close 1 days ago is above low 4 days ago
open and close is below high 4 days ago
open and close is above low 4 days ago
******************************************************
So why do the following two more concise attempts at the above filter produce different results?
open for the last 3 days has been below the high 4 days ago
close for the last 3 days has been below the high 4 days ago
open for the last 3 days has been above the low 4 days ago
close for the last 3 days has been above the low 4 days ago
open has been below high 4 days ago for the last 3 days
close has been below high 4 days ago for the last 3 days
open has been above low 4 days ago for the last 3 days
close has been above low 4 days ago for the last 3 days
|
jaketheguy 52 posts msg #37994 - Ignore jaketheguy |
9/16/2005 4:09:53 AM
Neither does the following seem to work correctly, erroneously returning symbol ACP:
I'm obviously new, but what am I missing?
|
jclaffee 81 posts msg #37995 - Ignore jclaffee |
9/16/2005 9:04:20 AM
Jake, try this:
Jim
|
alf44 2,025 posts msg #37998 - Ignore alf44 |
9/16/2005 9:12:11 AM
jaketheguy,
First, thanks for the response and the effort.
With your filter you have defined a series of days whose Open AND Close BOTH fall within the High/Low Range of some bar 5 days ago. And while...technically it fits into the criteria that I tried to define...that's not exactly what I was looking for. Your filter would EXCLUDE those days where ONLY the Open...OR...ONLY the Close fell into the High/Low Range of a day 5 days ago. And THAT is the tricky part that I (and others apparently) haven't been able to solve (yet).
Again, thanks for your thoughts and I hope you'll feel free to offer more !
alf44
|
jaketheguy 52 posts msg #38000 - Ignore jaketheguy |
9/16/2005 10:55:56 AM
Hey Jim,
Your filter returns the same 110 stocks as mine. However, there seems to be an error in StockFetcher, because one of the returned stocks is ACP, which, if you look at its open and close the last three days, you'll see that it failed the filter criteria on 12 Sept.
Thanks.
|
jclaffee 81 posts msg #38001 - Ignore jclaffee |
9/16/2005 12:14:04 PM
Ouch!
I failed to run your filter, Jake, and I ASSUMED that it had produced only the one hit. Sorry 'bout that.
I see the fault with the issue you mentioned. . .I'll smoke that over a little this time!
Jim
|
jaketheguy 52 posts msg #38002 - Ignore jaketheguy |
9/16/2005 12:31:38 PM
Hey alf, see below for the solution to your problem. This problem demonstrates well the concepts that were the subject of this thread:
|
jaketheguy 52 posts msg #38003 - Ignore jaketheguy |
9/16/2005 12:59:42 PM
Jake, try this:
Jim
****************************************
Jim, The phrase "4 days
ago", as in,
set{hi4, high 4 days ago}
will actually be the 5th candle or bar on the chart, so you would want to change the other phrases to: and hi4 is above Open last 4 days.
However, as explained by Tom from StockFetcher in an email response, this does not really do my original intention of keeping both the OPEN and CLOSE of the last 4 days within the High Low range of the 5th day back. The reason being that "hi4" is not a constant but changes based on the "last 3 days" phrase.
For example the phrase:
hi4 is above Open last 3 days
Will make the following comparisons:
hi4 0 days ago is above open 0 days ago
hi4 1 day ago is above open 1 day ago
hi4 2 days ago is above open 2 days ago
The correct filter to do that is as follows, complements of Tom:
Thanks Tom!
|
alf44 2,025 posts msg #38005 - Ignore alf44 |
9/16/2005 1:42:44 PM
jaketheguy,
You posted:
-----------------------
Hey alf, see below for the solution to your problem. This problem demonstrates well the concepts that were the subject of this thread:
----------------------
In order to fit the criteria as I have described in my previous posts your opening description SHOULD read:
open OR close 3 days ago is below high 4 days ago
AND open OR close 3 days ago is above "LOW" 4 days ago
AND open OR close 2 days ago is below high 4 days ago
AND open OR close 2 days ago is above "LOW" 4 days ago , etc
As for the filter that you wrote...did you run it ? And if so...did it return any results ? I didn't have any luck with it when I tried.
alf44
|