karennma 8,057 posts msg #122667 - Ignore karennma |
1/29/2015 9:27:07 AM
For example:
If the filter has "add column high 10 week high" ....
I then want SF to give me the % difference between today's close and the 10-week high ..
???
Anyone know how to write that?
|
bka58 49 posts msg #122668 - Ignore bka58 |
1/29/2015 10:44:03 AM
Maybe this....
set{diff2,high 10 week high minus close}
set{diff2%,diff2 / close}
set{ratio,diff2% * 100}
add column high 10 week high
add column ratio
|
karennma 8,057 posts msg #122674 - Ignore karennma |
1/29/2015 12:47:33 PM
Hi bka58,
Thanks so much.
That "looks" perfect, but I'm not sure why it's not working.
For example, the stock I was looking at was Pilgrim Pride, the chicken people, symbol PPC.
The 10-week high price was $38.64 and let's say the current price is $28.31, so that's a 26% difference.
So, the ratio column should say 26%.
:>/
|
bka58 49 posts msg #122677 - Ignore bka58 |
1/29/2015 3:40:39 PM
My math shows it to be closer to 36%, not 26%. But, I could be missing something.
|
compound_gains 222 posts msg #122679 - Ignore compound_gains |
1/29/2015 4:41:21 PM
Yes...(38.64 - 28.31) / 28.31 = 36.5%
|
karennma 8,057 posts msg #122680 - Ignore karennma modified |
1/29/2015 4:44:31 PM
Okay. When I use "symlist(PPC)", both filters yield the same answer for PPC >>> 32.83 .
Thanks.
|
karennma 8,057 posts msg #122681 - Ignore karennma |
1/29/2015 4:55:06 PM
bka58
37 posts
msg #122677
- Ignore bka58 1/29/2015 3:40:39 PM
My math shows it to be closer to 36%, not 26%. But, I could be missing something.
===================================================
What concerns me more than the filter is my math!
That's scary!
LOL!
|
mahkoh 1,065 posts msg #122689 - Ignore mahkoh |
1/30/2015 4:24:13 AM
I don't think there is anything wrong with your math.
28.31 is a 26.7 % retracement from a high of 38.64.
It just depends on your point of reference.
|
karennma 8,057 posts msg #122690 - Ignore karennma |
1/30/2015 7:01:50 AM
@mankoh,
Wheww!
Thank you!
:>)
|