StockFetcher Forums · General Discussion · Is there a way .....<< 1 2 >>Post Follow-up
kanuk
32 posts
msg #31896
Ignore kanuk
4/27/2004 9:08:34 PM

.... of displaying 'intermediate' values used in a filter? If a filter uses several 'set' commands - set(c1,....), set(c2,......) etc - is there a way of displaying the values of c1, c2?


kanuk
32 posts
msg #31897
Ignore kanuk
4/28/2004 8:48:05 AM

I found my answer but uncovered a different problem. Using the filter -
set {c1,count(pattern is bullish harami,1)} and set {c2,count(pattern is bullish engulfing,1)} and set (OR1,c1 + c2) find stocks where OR1 is above 0 and price is between 1 and 3 and add column c1 and add column c2 - I get a pile of results, but for 99.9% of them C1 and C2 are both equal to 1, meaning that both patterns are valid for the same day and I don't think this is possible.

Can someone explain where I'm going wrong


DasKapital
36 posts
msg #31898
Ignore DasKapital
4/28/2004 11:19:42 AM

Hi kanuk,

Are these results closer to what you expected?

Fetcher[set{c1,count(pattern is bullish harami,1)} and set{c2,count(pattern is bullish engulfing,1)} and set{OR1,c1 + c2} and find stocks where OR1 is between -.01 and 1.01 and price is between 1 and 3 and add column c1 and add column c2 and add column OR1]



Best regards,
DK


kanuk
32 posts
msg #31899
Ignore kanuk
4/28/2004 11:52:31 AM

Many thanks DK, that got me just what I wanted. I can't help but wonder why the 'is between' test worked while the 'is above' test didn't work.

Kanuk


cegis
235 posts
msg #31901
Ignore cegis
4/28/2004 12:05:12 PM

DasKapital,

I don't think that's gonna work... The OR1 variable is used to determine if either of the two screening phrases within the count() functions were true. By having the condition "OR1 between -.01 and 1.01, you're including zero, which means neither condition was satisfied. kanuk is looking for at least one of the two conditions (from what I understand). His point is that the filter is returning a lot of stocks with both conditions true, which he thinks is contradictory. (I don't know enough about the patterns to know if this assertion is correct.) Your filter does excludes matching both, by not including the OR1 value 2. But I don't think that's kanuk's point...

kanuk,

Have you looked at the charts of the resulting "double matches"? Do they satisfy either (or both) patterns? Might both of the patterns match but for a different time frame?? I don't really know anything about these patterns to be able to help diagnose the problem. Could it be that the count() function is not recognizing the "pattern is" phrase? And, just to cover all the bases (I don't mean to be derogatory here), are you sure the patterns are in fact mutually exclusive? And, lastly, correct me if any of MY assertions above are wrong!!!

HTH,

C


kanuk
32 posts
msg #31902
Ignore kanuk
4/28/2004 1:00:52 PM

Guys:
This is getting real interesting.

When I run the filter above, on Canadian stocks, I get 7 matches, 2 under 'c1' - the bullish harami and 5 under 'c2' - the bullish engulfing. By a match I mean a value, for c1 or c2, of 1.0

when I created the new filter "find stocks where price is between 1 and 3 and pattern is bullish harami" I got 5 stocks - but the same 5 that were showing under 'c2' (the bullish engulfing pattern) in my original filter (updated by DK).

Using Bigalow's "Profitable Candlestick Trading" to be "da judge" it would seem that the new filter, not using the count function , gives the correct results. But now what? It would appear that to scan for several different candlestick patterns one one need a separate filter for each.

Kanuk


DasKapital
36 posts
msg #31903
Ignore DasKapital
4/28/2004 1:42:37 PM

kanuk,

First of all, allow me to concede cegis' point that the -.01 is incorrect,and to exclude 0 as a possible value for OR1, it should be .01....

Now, I was able to reproduce the results you referred to above, and I think the explanation goes something like this:

In the filter I posted, where the results are c1=1,c2=0, the filter is telling you that these stocks are all of the same pattern, and not telling you which pattern specifically...and where c1=0,c2=1, these stocks are all the other pattern.

When you rewrote the screen for only one pattern, you got exactly the pattern you were expecting. Make sense?

Regards,
DK




kanuk
32 posts
msg #31904
Ignore kanuk
4/28/2004 1:56:20 PM

DasKapital:

Thanks for the info on -0.01 vs 0.01. I'll make the change.

In 'our' filter, c1 equals the number of times that the bullish harami pattern is recognized for the time duration specified (1 day). If c1 = 1 then that stock should have a bullish harami pattern for that day, but it doesn't - it has a bullish engulfing pattern. That was my interpretation of the 'count' feature. Theoretically I should be able to expand the filter with c3,c4,c5....cn to cover all the candlestick patttens and the corresponding c3,c4 etc values (0 or 1) would tell me what pattern a given stock was exhibiting.

It seems to report c1 values in the c2 column and vice versa

Kanuk


DasKapital
36 posts
msg #31905
Ignore DasKapital
4/28/2004 2:15:18 PM

kanuk,

Yes, I see your point. Darn, I'm wrong again! That's twice today...think I'll quit!

Later,
DK


tomb
261 posts
msg #31908
Ignore tomb
4/28/2004 3:24:19 PM

Hi,

We have fixed a bug with the values returned by the candlestick routines which should allow your filter to work.

Below is a revised version:

Fetcher[
set{c1,count(pattern is bullish harami,1)}
and set{c2,count(pattern is bullish engulfing,1)}
and set{OR1,c1 + c2}
and find stocks where OR1 is above 0
and price is between 1 and 3
and add column c1
and add column c2
and add column OR1
]



Hopefully the above helped!

Thank you,

Tom
StockFetcher.com Support



StockFetcher Forums · General Discussion · Is there a way .....<< 1 2 >>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