StockFetcher Forums · General Discussion · Followup on Need some help on 7/17 .... Help please<< 1 2 >>Post Follow-up
nikoschopen
2,824 posts
msg #45981
Ignore nikoschopen
7/19/2006 4:05:00 PM

jmahon01,

StockFetcher will accept symbols "=" and ">" but not ">=". I would think only one of the two, most likely whatever comes first, will be considered. Be that as it may, "OR equals 1" literally means "find this OR that". Now let's compare this to "OR greater than 1", which has the same connotation as "find this AND that" since it must return 2 as its result.

In the case of the former (eg. "find this OR that"), StockFetcher will find all stocks that meet just one of the criteria, that is, one or the other. In the screening process, suppose that StockFetcher finds one stock that has moved more than 10% of its 10-day range*** (the first condition of ure original criteria. Also see below for side note) and another stock that had a 10-day range greater than $5 (the second condition of ure original criteria). Since both stocks technically meet the criteria, StockFetcher will then return both stocks as matches.

In the case of the "OR is above 1" (eg. "find this AND that"), Stockfetcher will return matches if and only if BOTH criteria are met. In other words, a given stock must have moved more than 10% of its 10-day range AND had a 10-day range greater than $5.

Since the second condition adds more restriction than the first, lower the number of matches will there be on balance.


*** On a side note, I don't quite understand the rationale behind ure first condition: set{10ratio,10range/close}. I assume what you have in mind is that today's close is at least 10% above the low of the previous 10-day trading range. If that's the case, then you can't just take the 10-day range and simply divide it by the close because that will only show you the depth of the range in relation to the close of the day. For example, if the previous 10-day range stands at $3 and today's close is at $20, ure condition will be met since the outcome of the equation will be higher than the stipulated 0.10. But suppose that today's close coincides with the low of that range, namely it is the low of the range. Although this particular stock will have met ure condition, I hardly think you would want to own such a garbage stock. So to find stocks that is at least 10% above the low of the past 10-day trading range, I ahve amended ure filter as follows:

Fetcher[
set{10hi,high 10 day high}
set{10lo,low 10 day low}
set{10range,10hi - 10lo}
set{10cllo,close - 10lo}
set{10ratio,10cllo / 10range}
set{OR1,count(10ratio greater than .10,1)}
set{OR2,count(10range greater than 5,1)}
set{OR, OR1 + OR2}
OR equals 1

add column 10ratio
add column 10range
]

FYI, I've added two columns that will yield information on the 10-day range as well as the ratio in regards to today's close.


nikoschopen
2,824 posts
msg #45982
Ignore nikoschopen
7/19/2006 4:40:43 PM

maxreturn,

First, please see the above note addressing the difference between "OR" and "AND". Second, I'm not arguing on the grounds that you can or cannot include or exclude anything. The poster of this thread asked specifically for the "either/or" rather than "both/and", which are not the same as the former. One of the most prominent reasons why you might opt for the former rather than the latter is that the latter might be too restrictive in scope since it must include both conditions into the equation. Another reason might be that the two conditions are diametrically opposite to one another.


maxreturn
745 posts
msg #45983
Ignore maxreturn
7/19/2006 9:01:27 PM

With all due respect Niko...if you were to state "OR above 1" you would indeed restrict yourself to only the stocks that met BOTH of the conditions. But by stating "OR above 0" you not only get the stocks that meet either one or the other of the two conditions but also the few stocks that meet both conditions.


nikoschopen
2,824 posts
msg #45984
Ignore nikoschopen
modified
7/19/2006 9:40:05 PM

maxreturn,

As I said earlier, I don't dispute the fact that "OR above 0" cannot be used. But with all due respect of proportional measure, I like to remind you again that the thread master wanted to screen for stocks using the "either/or" approach. For the benefit of ure reading pleasure, I regurgitate what he wrote in another thread entitled "Need some help on a filter build", to which he was largtely alluding at the top of this thread:

Any "filter expert" out there that could take a look at a filter clause that I am trying to build ..... and please tell me where I am going wrong ??? What I want to do is to focus on the "highest HIGH" of the last 15 days .... subtract from it the "Lowest LOW" of the last 15 days then divide by todays close (to get a decimal .... which I then compare to .10). Then, WITHOUT having created the decimal want to compare the previous simple subtraction result to $5. In "layman's terms" what I am looking for in this clause are those stocks that (in the last 15 days) have had fluctuations of either 10% OR greater than or equal to 5 dollars. The filter clause I am using at this point is as follows (but it doesn't seem to be working)



jmahon01
19 posts
msg #45999
Ignore jmahon01
7/20/2006 12:07:06 PM

Niko ... thanks for the writeup with the new logic and formula. However, just in case someone else reads it and wants to use it .... I wanted to say that I THINK the 5th clause where you calculate the new ratio is reversed. The clause reads "set{10ratio,10cllo / 10range}" but am pretty sure it should read "set{10ratio,10range / 10cllo}" .

Other: Niko and Max ..... I do not mean to take sides on your tangential discussions related to my request. However, I think I should clarify that my intention was to select a stock if it experienced a 15 day (sometimes I use 10 days) fluctuation of 10% (.10) or more .... AND also to select it if it experienced a fluctation of 5 points or more (even in those cases where those 5 points+ may NOT have caused it to reach the 10% mark). So, yes .... I really DID want to raise the flag when EITHER situation occurred, and so have gone with the "OR above 0" clause. Bottomline .... I am kinda new at this whole aspect of trying to build the filters correctly, and do my own selecting, and that's why I was asking for some help. But I do apologize if my wording was unclear or misleading. I thought I was safeguarding against being misleading by qualifying my description(s) as "in layman's terms". In any event, I am grateful to both of you for your timely responses, and also for the keen interest shown. It has been a real good learning experience for me! I appreciate it very much .... Happy Trades!

Thanks again/JPM


nikoschopen
2,824 posts
msg #46001
Ignore nikoschopen
7/20/2006 1:43:53 PM

jmahon01,

Since the 10-day range (10range) is, by all measure, larger than the distance from the close to the low of the range (10cllo), you would want to calculate as I have done to approximate how large the latter is in view of the former (eg, the distance between the close and the low of the range is approximately 10% of the range, etc). Should you flip the two on the other hand, the resultant number will be based on how large the range is in comparison to the distance between the close and the low (eg. the range is 3 times as large as the close-low, etc.)

With regards to maxreturn's assertion, there really isn't a difference of opinion between us. I readily agree with his views, but his premise doesn't accurately reflect let alone address ure needs. Besides, I'm more of a control freak and prefer to use other methods than "OR is above 0" when it comes to "AND" operator. For instance, why use "count(abc + xyz,1)" instead of "count(abc * xyz,1)"? The latter doesn't have to deal with what maxreturn said earlier about keeping score with "the stocks that meet either one or the other of the two conditions but also the few stocks that meet both conditions".


StockFetcher Forums · General Discussion · Followup on Need some help on 7/17 .... Help please<< 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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.