jthelen 29 posts msg #103258 - Ignore jthelen |
11/8/2011 10:29:19 AM
Has anyone created custom monthly indicator logic?
Can a custom indicator be created for monthly values by setting the last week’s close of the previous month as the monthly close, creating an indicator of that data, and then plugging that into a predefined indicator such as RSI or MACD?
I think it could be done; I’m just not sure how to wrap my mind around it. I thought something along these lines…
Chart type weekly
/*Define monthly close dates
set{m1, close date offset 10}
Set{m2, close date offset X}
Set{m3, close date offset X}
Etc…
/*Create custom indicator of the monthly closes
/* Now use custom indicator data in a formula (such as RSI(2))
Does anyone have any ideas on how to accomplish this?
JT
|
mahkoh 1,065 posts msg #103265 - Ignore mahkoh |
11/8/2011 5:16:40 PM
I use the following to calculate last month's input values for monthly pivot points:
set{mh,high 22 day high 6 days ago}
set{ml,low 22 day low 6 days ago}
set{mcl,close 6 days ago}
where these values were valid for 2011-11-8. Tomorrow after 10:00, when SF starts generating data for 2011-11-9 I change them to "7 days ago" and so on every new day.
On the 1st of the next month I count the trading days in the prior month and adjust "high 22 day high" and "low 22 day low"
Hope this may get you started.
|