dcsnowden 52 posts msg #101905 - Ignore dcsnowden |
8/1/2011 10:22:49 AM
Is it possible to get the relative strength of a moving average? Not sure how helpful an indicator like this would be...but curious. Can anyone write the code for something like... RSI(2) of MA(7) or MA(15)? One can choose his/her own parameters. Don't really know if this is a simple request or something SF is not set up to compute....THX in advance...DCS
|
four 5,087 posts msg #101907 - Ignore four modified |
8/1/2011 11:37:35 AM
---
StockFetcher provides a Moving Average of an Indicator...
CMA = Custom Moving Average
CEMA = Custom Exponential Moving Average
--- Examples Below with RSI(2) ---
draw cma(rsi(2),7)
draw cema(rsi(2),7)
|
dcsnowden 52 posts msg #101912 - Ignore dcsnowden |
8/1/2011 3:09:36 PM
THX Four...been reading your post for...what 10 years or more, appreciate the comeback... obviously this is another search for anything oversold, so I'm playing around with one of this sites old faithfuls rsi(2) < 1 or 5 or 15...what ever it takes to get some feedback based on the last 2 datapoints of a moving average of some length...in this example 7
draw cma(rsi(2),7) < 15
close > close 1 day ago
etf
add column cma(rsi(2),7)
The question I'm concerned with is I'll get a hit like UNG...using a 3-month daily, the ma(7) is going down, like you'd expect and today's close is higher....the problem is..if you'll look back about 1 month you'll see that UNG had a much longer ma(7) downturn and after working the filter backwards in order to get the results during that downturn there were no hits on any of the up days which could have potentially signaled an upturn. Surely after a longer trip down there would be more chances for a hit.. What am I missing?? THX Again...
|
Eman93 4,750 posts msg #101914 - Ignore Eman93 |
8/1/2011 3:53:09 PM
four
974 posts
msg #101907
- Ignore four
modified 8/1/2011 11:37:35 AM
---
StockFetcher provides a Moving Average of an Indicator...
CMA = Custom Moving Average
CEMA = Custom Exponential Moving Average
--- Examples Below with RSI(2) ---
draw cma(rsi(2),7)
draw cema(rsi(2),7)
that will give you the the 7 period moving average of the RSI(2)
Relative Strength Indicator was developed by Wilder
Investopedia def
A technical momentum indicator that compares the magnitude of recent gains to recent losses in an attempt to determine overbought and oversold conditions of an asset. It is calculated using the following formula:
RSI = 100 - 100/(1 + RS*)
Where RS = Average of x days' up closes / Average of x days' down closes.
|
four 5,087 posts msg #101925 - Ignore four modified |
8/2/2011 12:28:06 AM
I add a line at 15
I add a count (when cma < 15 then cnt = 1)
I add a count (when close > close 1 day ago then cls = 1)
----> when cnt = 1 and cls = 1 then both conditions are true.
...Notice the moving average of rsi(2) does not dip below 15 (until Aug)... however, the rsi(2) does dip below 15 (several times).
Let's move the '15' to '30' so the moving average dips below.
Change the '15' to '30' and Voila ... Both conditions = true = 1 on: April 11, April 13, May 12, May 13, Jun 21, Jun 24, Jun 27, Aug 1
|