nibor100 1,031 posts msg #147402 - Ignore nibor100 |
4/16/2019 10:45:32 AM
A recent filter posted in the "Intersecting 1 month high with daily candle" thread had the following line which I believed to be not required due to its logic and the logic of the rest of the filter:
"and close >= close 1 month high"
a. First I was thinking how could today's close ever be greater than the current 'close 1 month high' so I tested the filter with following line:
"and close > close 1 month high add column close 1 month high"
which got no results as I was expecting
b. Then I tried the following line while commenting out every line below it in the posted filter:
"and close >= close 1 month high add column close 1 month high"
which got 27 results with the values in the column close 1 month high matching the values in the Last column(which is today's intraday close)
c. Then I tried the following line while commenting out every line below it in the posted filter:
"and close = close 1 month high add column close 1 month high"
and got 162 results and noticed that many of them had the value in the column 'close 1 month high' different from today's close value shown in the Last column
d. Then I tried the following line while commenting out every line below it in the posted filter:
"and close equals close 1 month high add column close 1 month high"
which got 27 results with the values in the column close 1 month high matching the values in the Last column
Does anyone know why substituting "=" for the word "equals" gets results which have values that turn out not to be equal in many cases?
Thanks,
Ed S.
|
graftonian 1,089 posts msg #147413 - Ignore graftonian |
4/16/2019 12:54:14 PM
Ed, I don't know why, but the "=" sign has never worked for me, no inaccurate results, just a filter crash.
even as simple as var = 1 does not work.
When are more TQQQ revelations forthcoming?
Graf
|
snappyfrog 721 posts msg #147415 - Ignore snappyfrog |
4/16/2019 1:34:14 PM
Nibor100 said:
b. Then I tried the following line while commenting out every line below it in the posted filter:
"and close >= close 1 month high add column close 1 month high"
which got 27 results with the values in the column close 1 month high matching the values in the Last column(which is today's intraday close)
d. Then I tried the following line while commenting out every line below it in the posted filter:
"and close equals close 1 month high add column close 1 month high"
which got 27 results with the values in the column close 1 month high matching the values in the Last column
**********************
Were the 27 results on both of these the same?
I have also had trouble with different results coming up when I run something like price crossed EMA(13)
You would think running 2 scans that say price crossed above EMA(13) and price crossed below EMA(13) would add up to the line price crossed EMA(13), but it doesn't.
|
nibor100 1,031 posts msg #147429 - Ignore nibor100 |
4/17/2019 12:22:48 PM
@snappyfrog,
1. The 27 results were the same for both of those lines.
2. I've always had issues with figuring out correct crossovers in SF, usually have to do trial and error until I get it right for a specific filter.
Below is some info that might help,
Ed S.
a. From the manual:
"StockFetcher always assumes “above” means “greater than or equal to” and
“below” means “less than or equal to.”
So is "crossed above" true when it is actually "equal to" and not really above it?????
b. Some SF results might be "-1" which is explained by TRO below:
"Because the SF DAYS returns a "-1" when the event didn't occur, the crossover calculation can be off.
The lines:
set{E5b1, count(E5b above -1 , 1)}
set{E5b2, E5b * E5b1}
set{E5a1, count(E5a above -1 , 1)}
set{E5a2, E5a * E5a1}
fix this problem.
So if you have been using any of the crossover counts, you need to add the fix."
|
nibor100 1,031 posts msg #147430 - Ignore nibor100 |
4/17/2019 12:30:10 PM
@ Graf,
I've been sidetracked a bit from TQQQ by trying to figure out more about SF's Slope command, but I will be posting more TQQQ stuff at some point in the next couple of days or so.
Springtime in Orlando means lots of company, and lots yardwork, etc. and NBA basketball as our Orlando Magic made the playoffs this year so we have some playoff games to attend this weekend.
Ed S.
|
snappyfrog 721 posts msg #147439 - Ignore snappyfrog |
4/17/2019 10:48:19 PM
Nibor100, thanks for the fix.
|