SAFeTRADE 646 posts msg #117202 - Ignore SAFeTRADE modified |
12/4/2013 12:31:32 PM
Why not or how would it be possible to use a value to do math or look back functions.
As in the following example;
SET{H20,DAYS(HIGH REACHED A NEW 20 DAY HIGH,10)}
set{x, H20 + 1}
ADD COLUMN H20
ADD COLUMN HIGH 20 DAY HIGH
ADD COLUMN LOW 20 DAY HIGH
ADD COLUMN LOW A DAYS AGO
SYMLIST(SPY)
The value of H20 is 3. Why can I not use the value of H20 to find the low of the 20 day high?
The I could also do the following;
set{isdl, low x days ago > low a days ago,1)}
Seems like there should be a way to do this, it would open up a whole new world of filtering.
What do you think?
________________________________________________________________________
An after thought. Maybe we could make a and x numeric, therefore use the values. You know
like assign or label as numeric. I don't know, seems possible to this feeble mind...
|
Kevin_in_GA 4,599 posts msg #117220 - Ignore Kevin_in_GA |
12/4/2013 9:20:22 PM
Perhaps a set of functions like
low(X,Y) and High(X,Y)
where X is the quantity being measured and Y is functionally days look-back but could also be a user-defined variable that returns a positive integer as well.
Example:
set{var1, count(close above close 1 day ago,10)}
add column high(close, var1)
|
SAFeTRADE 646 posts msg #117222 - Ignore SAFeTRADE |
12/4/2013 9:31:38 PM
Kevin, that is exactly what I am thinking. You explained it better though. Thanks
Clarence
|
SAFeTRADE 646 posts msg #117245 - Ignore SAFeTRADE |
12/5/2013 10:01:52 PM
Bump to the top.
|
stockfetcher 980 posts msg #117259 |
12/6/2013 12:12:42 PM
Below is an example using the new "VarOffset()" function that should do what you are looking for:
The VarOffset() function is a new function that we are still working on and testing. So if you run into any bugs or unexpected results, please let us know. Additionally, due the performance concerns of this function, it is possible that some scenarios may not produce results.
VarOffset() takes 2 parameters:
Parameter #1 - The indicator you wish to access a past value from. For example, "close" or "RSI(10)"
Parameter #2 - The variable or value that determines how to calculate the variable offset. In the example above var_ago is the number of days since the stock reached a new 20 day high. Because "days()" can return -1, not all stocks will match this condition.
Here is another example:
Please let us know if you have any questions or run into any issues.
Thank you,
StockFetcher Support
|
SAFeTRADE 646 posts msg #117260 - Ignore SAFeTRADE |
12/6/2013 12:17:56 PM
Thanks Stockfetcher, I am going to have a longer look at this to see if it does what I intend for it. Thanks again.
|
SAFeTRADE 646 posts msg #117263 - Ignore SAFeTRADE |
12/6/2013 2:42:55 PM
Stockfetcher,
Not seeming to work. A little help, please.
Clarence
|
stockfetcher 980 posts msg #117265 |
12/6/2013 3:09:54 PM
We are not sure the intent of the following line. The syntax is not valid.
set{var_ago1,(low, a days ago)}
If possible, can you provide more details concerning what you are looking to do?
Thank you,
StockFetcher Support
|
SAFeTRADE 646 posts msg #117267 - Ignore SAFeTRADE |
12/6/2013 3:40:20 PM
12/6/2013 3:09:54 PM
We are not sure the intent of the following line. The syntax is not valid.
set{var_ago1,(low, a days ago)}
If possible, can you provide more details concerning what you are looking to do?
Thank you,
StockFetcher Support
set{var_ago, days(high reached a new 20 day high,10)}
set{a, var_ago +3}
set{var_ago1,(low, a days ago)}
add column varoffset(low, var_ago1)
symlist(spy)
add column var_ago
add column a
Yes, I am adding 5 from var_ago and 3. 3 as in 3 days before the 20 day high. Trying to arrive at the low
3 days before the 20 day high. Then draw a line at the low of 3 days before the 20 day high. That number will change
the farther away we move form the high. If the high is today than the low would be 3 days prior. Hope that helps.
Clarence
|
stockfetcher 980 posts msg #117268 |
12/6/2013 3:48:26 PM
If you are looking for the low 3 days prior to the high, below is an example (you may need to click on the filter text to see the actual results.)
StockFetcher Support
|