StockFetcher Forums · General Discussion · Use of Variables<< >>Post Follow-up
robmar83
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.

RM

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

syntax issue reference the user guide

Fetcher[

set{x, price}

x > 5
x < 10

]



robmar83
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?

Kevin_in_GA
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 -

Example:

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

Fetcher[
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:

Fetcher[

show stocks where RSI(5) is above 70
]



Different results.

Kevin

StockFetcher Forums · General Discussion · Use of Variables<< >>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.