smithman 8 posts msg #105945 - Ignore smithman |
4/19/2012 12:38:45 PM
I wanted to use an OR expression like (A or B or C) where A,B,C are True or False results. Then, I learned that SF doesn't allow OR expressions. So, I converted the OR expression to an AND expression using a Truth Table. (A or B or C) equivalent to NOT(-A and -B and -C).
However, now I need to use a NOT function. But I don't believe I can use NOT in StockFetcher. Does anyone know a 'workaround' for NOT?
Coach John
|
Kevin_in_GA 4,599 posts msg #105946 - Ignore Kevin_in_GA |
4/19/2012 12:45:46 PM
Search the forums for "complete logic system".
Always use the search function before posting - you'll usually find that the answer is there.
Kevin
|
smithman 8 posts msg #105950 - Ignore smithman |
4/19/2012 4:35:31 PM
I did search for boolean NOT and read all there was in that thread including stuff about using set statements to create If-Then constructs. Just now I tried searching for "complete .." as you suggested with no results... Is there a write up somewhere here on a work-around for the NOT Boolean function?
|
mktmole 325 posts msg #105951 - Ignore mktmole |
4/19/2012 5:06:25 PM
Kevin's post did give the answer. Try again.
|
smithman 8 posts msg #105952 - Ignore smithman |
4/19/2012 6:32:01 PM
His answer "NOT Implementation" doesn't work for me. I'm a newbie, trying very hard to learn this programming language. The problem may be that I can't use the method because my components are incorrect. I'm trying to test for a series of comparisons between averages. My challenge is testing for NOT(Average(10)>Average(20) AND Average(20)>Average(50)). I tried two methods and both failed.
METHOD 1
Set{T1,Count(Average(10) above Average(20),1)}
Set{T2,Count(Average(20) above Average(50),1)}
Set{T3, T1+T2}
Show stocks where T3 is above 0
METHOD 2
Set{D1, Average(10)-Average(20)}
Set{D12, Count(D1 above 0,1)}
Set{D2, Average(20)-Average(50),1)}
Set{D22, Count(D2 above 0,1)}
Set{D, D12 + D22}
Show stocks where D above 0
Please help me learn what I am doing wrong here.
I appreciate any guidance you can give me.
|
mktmole 325 posts msg #105954 - Ignore mktmole |
4/19/2012 6:51:06 PM
welcome!
Method 1 try..
|
smithman 8 posts msg #105955 - Ignore smithman |
4/19/2012 8:22:15 PM
Thank you so much, Mr./Mrs. MktMle!
|
olathegolf 119 posts msg #105956 - Ignore olathegolf |
4/19/2012 9:29:35 PM
TRO has a bunch of posts on this. Here's an excerpt......
guru_trader
454 posts
msg #54660
- Ignore guru_trader 9/9/2007 3:22:11 AM
Yes, thanks for TRO and others ...
Currently StockFetcher does not support conditional boolean logic directly. This is due to the potentially enormous computational impact it might have on StockFetcher's servers. There are, however, some work-arounds which may accomplish any boolean logic (or/if conditions). See the following forum posts for some solutions:
http://www.stockfetcher.com/stockdb/fetcher?p=forum&sub=view&fid=1001&tid=28017
http://www.stockfetcher.com/stockdb/fetcher?p=forum&sub=view&fid=1003&tid=28019
|