drawerguy 14 posts msg #112221 - Ignore drawerguy modified |
3/13/2013 8:51:45 PM
I've been trying to write a scan for " inside months", but not having much luck and I've run out of ideas. Does anyone know if it's even possible on SF? I was able to write one to find inside weeks but finding trying to write one for a month isn't working out that well
|
mahkoh 1,065 posts msg #112240 - Ignore mahkoh modified |
3/14/2013 2:32:34 PM
It requires some work as SF does not have monthly data
First determine how many trading days there were in the previous month. For February there were 19.
Today (Mar 14) we are at the 10th trading day of March. To calculate February's monthly high and low
set{prevmhigh,high 19 day high 10 days ago}
set{prevmlow, low 19 day low 10 days ago}
to check which stocks in the S&P500 so far have an inside month:
You do need to adjust these numbers daily
For tomorrow:
It really is a pity this doesn't work
|
drawerguy 14 posts msg #112246 - Ignore drawerguy |
3/14/2013 4:53:17 PM
Hey mahkoh - you are awesome, it's EXACTLY what I needed !! And by analyzing the syntax that you wrote, I just learned a whole hell of a lot. Thanks so very much !!
|
drawerguy 14 posts msg #112247 - Ignore drawerguy |
3/14/2013 5:00:42 PM
And I especially like the high and low lines for the previous month. Makes the chart look so very clear for what I'm looking for.
Thanks again mahkoh
|