mat337d 4 posts msg #54009 - Ignore mat337d modified |
8/12/2007 8:47:12 PM
I am trying to create a filter that will take the moving average (10 day in this case) of an exponetial moving average (20 day in this case) below is my attempt to do this:
set{smaofema,((EMA(20) 9 days ago + EMA(20) 8 days ago + EMA(20) 7 days ago + EMA(20) 6 days ago + EMA(20) 5 days ago + EMA(20) 4 days ago + EMA(20) 3 days ago + EMA(20) 2 days ago + EMA(20) 1 days ago + EMA(20))/10) - ((EMA(20) 10 days ago + EMA(20) 9 days ago + EMA(20) 8 days ago + EMA(20) 7 days ago + EMA(20) 6 days ago + EMA(20) 5 days ago + EMA(20) 4 days ago + EMA(20) 3 days ago + EMA(20) 2 days ago + EMA(20) 1 days ago )/10) }
show stocks where smaofema is above 0
and smaofema 1 days ago is below 0
and draw EMA(20)
and draw smaofema
this filter is giving 0 results. this is similar to taking the ema(20)- ema(20) 1 days ago. except it has a MA applied to it. I hope someone can help me with this filter. thanks
|
nikoschopen 2,824 posts msg #54013 - Ignore nikoschopen |
8/12/2007 9:40:47 PM
StockFetcher currently provides Custom Moving Average (CMA), Custom Exponential Moving Average (CEMA), and Custom Weighted Moving Average (CWMA).
In ure case, you merely need to utilize the CMA in ure filter:
cma(ema(20),10)
Hence, if I'm looking for stocks that have crossed above its SMA(10) of EMA(20)...
|
mat337d 4 posts msg #54020 - Ignore mat337d |
8/12/2007 11:17:14 PM
thank you nikoschopen, that function worked perfectly.
|