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
|
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
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:
Different results.
Kevin
|