StockFetcher Forums · General Discussion · If, Or, Boolean Logic<< >>Post Follow-up
bkhurana43
103 posts
msg #98077
Ignore bkhurana43
12/17/2010 5:38:48 PM

Since Programming of Boolean Logic (if, Or Conditions) is bit confusing to me on SF platform, I would appreciate some help in that regard. I have three variables (VAR1, VAR2 and VAR3), their calculated values may either be 0 or 1. The condition I wish to perform is as follows:

IF VAR3=1 Move 0 to VAR1 and VAR2
ELSE proceeed to next step

straken
469 posts
msg #98078
Ignore straken
12/17/2010 6:15:47 PM

The Stockfetcher scripting logic has the lack of Booly & Set Logic (if,no,true,false,and,or) statements, but is easily overcome with a clever use of the COUNT command. Try your set arguement variables like the following example syntax


Fetcher[
set {var3, count(price above ma(5),10)}
add column var3
]



You can also use the sum command for summation queries

Fetcher[
set{var5, close - close 1 day ago}
set{var6, var5 * volume},
sum(var6,10) > 0
]



miko
68 posts
msg #98104
Ignore miko
12/18/2010 11:54:19 PM

http://forums.stockfetcher.com/sfforums/?q=view&tid=28017&start=0

Thanks to therumpledone

StockFetcher Forums · General Discussion · If, Or, Boolean Logic<< >>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.