StockFetcher Forums · General Discussion · How to call a set variable<< >>Post Follow-up
strategynode
5 posts
msg #123810
Ignore strategynode
5/18/2015 5:28:05 PM

This might be a very stupid question but I do I call the variable I set

example:

Set {GreenBar, Close > Open}

I am trying to define GreenBar so that I can use that later in a a code say like GreenBar 1 day ago.

Please advise if this is the best way to go about it. Also can you use and in a set syntax for example

Set {GreenBar, Close > Open and Volume > 200000} or maybe Set {GreenBar, Close > Open, Volume > 200000}

four
5,087 posts
msg #123812
Ignore four
modified
5/18/2015 5:38:40 PM

I am trying to define GreenBar so that I can use that later in a a code say like GreenBar 1 day ago.

Set {GB1ago, Close 1 day ago > Open 1 day ago}



strategynode
5 posts
msg #123814
Ignore strategynode
modified
5/18/2015 7:45:20 PM

Thanks @four but how do I call the variable? When run Set {GB1ago, Close 1 day ago > Open 1 day ago} it gives me 0 stocks when I say
show stocks where GB1ago is true it gives me an error

also can I have multiple criteria in the same variable definition?

Kevin_in_GA
4,599 posts
msg #123815
Ignore Kevin_in_GA
5/18/2015 9:48:28 PM

1. Just add the line "GB1ago above 0" to get only those stocks which meet that criterion.

2. No - you can only have one mathematical or logical operation per set{} statement, but you can get more than one at the same time by doing the following (generic example):

set{variable1, count(close above close 1 day ago,1)}
set{variable2, count(average volume(30) above 500000,1)}

now each of these will give you a 0 if it is not met, or a 1 if it is met. If both must be met, then just multiply them together.

set{variable3, variable1 * variable2}

then say "variable3 above 0" to get only those stocks that meet both criteria.

strategynode
5 posts
msg #123819
Ignore strategynode
modified
5/19/2015 1:10:13 PM

Thanks

StockFetcher Forums · General Discussion · How to call a set variable<< >>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.