glgene 616 posts msg #99170 - Ignore glgene |
2/16/2011 11:18:25 PM
Need some help here. I was at an IBD Meet-up last night, and the facilitator said his software could track this:
"Show the % of time over the last 100 market days a given stock symbol (e.g., ETN) was above its 20-day EMA."
His answer, for ETN, was 95%.
Can this be programmed into SF? Using the Count feature, but showing the output in % format (such as 95%)? I haven't used such feature, so I would appreciate any help here with building this SF script (using a Symlist of stock symbols).
If someone can help, THANKS in advance.
Gene
|
glgene 616 posts msg #99171 - Ignore glgene |
2/16/2011 11:58:37 PM
Here is my start, but not sure how to include the Count feature, to show what % of time a stock symbol (e.g., ETN) is above its 20-day EMA over the past 100 market days.
Can someone complete my desired script? Thanks!
Gene
|
glgene 616 posts msg #99173 - Ignore glgene |
2/17/2011 12:15:19 AM
OK, I followed the sample script in the online manual (page 124), and now tried this as my script:
It doesn't work.
The "count" example on page 124 shows:
Count (indicator, length)
SOS?
|
mystiq 650 posts msg #99177 - Ignore mystiq |
2/17/2011 3:19:11 AM
glgene
msg #99173
- Ignore glgene 2/17/2011 12:15:19 AM
OK, I followed the sample script in the online manual (page 124), and now tried this as my script:
It doesn't work.
The "count" example on page 124 shows:
Count (indicator, length)
count(ema(20) "DOES WHAT", 100) ---?
should be count(close > ema(20) , 100)
|
bkhurana43 103 posts msg #99178 - Ignore bkhurana43 |
2/17/2011 6:32:13 AM
glgene
will this serve the purpose.? By the way what is IBD strategy behind this?
|
Kevin_in_GA 4,599 posts msg #99180 - Ignore Kevin_in_GA |
2/17/2011 6:41:15 AM
"Show the % of time over the last 100 market days a given stock symbol (e.g., ETN) was above its 20-day EMA."
His answer, for ETN, was 95%.
+++++++++++++
First, recognize that his answer is already out of date, but try the following:
|
glgene 616 posts msg #99182 - Ignore glgene |
2/17/2011 10:54:12 AM
bkhurana and Kevin,
Right on the money! Thank you.
One further question, though (from my orig. question). I need to convert the answer to a %. I know with the 100-day count, if the answer is 98, then I can easily 'see' that means 98%. But let's change it to a 50-day lookback. If the count is 30, I need the answer to show as 60% (30/50), not 30 (the actual count).
Is the % column doable? Could you show me? Thanks, again!
Gene
p.s. From my orig. question, I reference I heard this at an IBD session, which WAS my source. But the guy who made the statement said he was computing the number in Trade Station software (not IBD software). When he made his statement, my antenna went up, figuring it could be done in StockFetcher I just didn't know how, since I had never previously used the Count command.
|
Kevin_in_GA 4,599 posts msg #99186 - Ignore Kevin_in_GA |
2/17/2011 3:23:02 PM
|
glgene 616 posts msg #99187 - Ignore glgene |
2/17/2011 4:04:46 PM
Thanks, again, Kevin.
You are so helpful. I really appreciate it.
One question: Is there any way of truncating the decimal info? So, for example, it would print as 96, instead of 96.00? Or is that a SF programming fix issue? The decimal info, if it's always .00, doesn't add anything to the results; just takes up space.
Gene
|
bkhurana43 103 posts msg #99192 - Ignore bkhurana43 modified |
2/17/2011 9:09:28 PM
Values are rounded up to 2 decimal places e.g: substitute 49 days for period instead of 50, you will get percenanswer calculated upto two decimal places.
|