StockFetcher Forums · General Discussion · Use of Variables<< >>Post Follow-up
3 posts
msg #98878
Ignore robmar83
2/3/2011 9:52:50 AM

I am trying to apply a variable to things such as average volume and moving averages. The basic idea is this:

Let X be a variable number.

High occurs X days ago
X day slope of close is below 0
volume is above average volume (X)
show stocks where X is between 5 and 30.

Is this possible? I tested the theory with the following and had no luck.

Price is X
show stocks where X is between 5 and 10.

Thanks for taking the time to read and reply.


206 posts
msg #98879
Ignore djones000buck
2/3/2011 10:58:55 AM

syntax issue reference the user guide


set{x, price}

x > 5
x < 10


3 posts
msg #98882
Ignore robmar83
2/3/2011 11:17:28 AM

Perhaps my testing was flawed but in the way I intend to use the variable I want X to be days. Is this possible? Can X, being days, be used in cases listed above?

4,599 posts
msg #98883
Ignore Kevin_in_GA
2/3/2011 11:20:38 AM

You cannot use a user-defiend variable as an input into another SF indicator -


Set{x, 5}

This sets a user-defined variable to the value of 5 (or whatever you want it to be).

Then if you try to say something like

Set{x, 5}
show stocks where RSI(X) is above 70

It simply returns the RSI(14) value - you can see this by looking at the RSI graph plotted below the price chart. There may be instances where this seems to work, but most likely it is working by ignoring the X or inserting a default value instead.

For comparison, here is the same filter without using X:


show stocks where RSI(5) is above 70

Different results.


StockFetcher Forums · General Discussion · Use of Variables<< >>Post Follow-up

*** Disclaimer *** 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. does not recommend particular securities., 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 2018 - 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