![]() |
Variable moving average |
Post Reply ![]() |
Author | |
maximo ![]() BullCharts Guru ![]() ![]() Joined: 02 Sep 2006 Location: Australia Posts: 232 |
![]() ![]() ![]() ![]() Posted: 27 Mar 2009 at 1:12pm |
I did a study of the CMO, Chande Momentum Oscillator myself (part of VIDYA), after having read Martin J. Pring's book 'Trading Systems Explained - How to build reliable technical systems' The CMO is a better oscillator for parcel splitting/scaling out than is RSI. Due to it factoring in both upward and downward momentum at the same time. So, it reaches the oversold and overbought regions more consistantly than RSI, but not more frequently. In that book he explains how to use the oscillator with a simple moving average to profit from both trending and ranging markets using a single method.
Here's the CMO with a histogram and average applied to it.
[Description ="CMOF - Filtered CMO, Max"]n:= Input("Length",10,1);momu:= If(C > Ref(C,-1),C - Ref(C,-1),0);momd:= If(C < Ref(C,-1),Ref(C,-1) - C,0);Momup:=momu / (1.75* Stdev(Abs(Typ()),n))*125;Momdn:=momd / (1.75* Stdev(Abs(Typ()),n))*125;CMOF:=100*(( Sum(Momup,n)-Sum(Momdn,n))/(Sum(Momup,n)+Sum(Momdn,n)));[color =blue; width=2]CMOF; [linestyle =solid; color=gold]Sig:= Ma(CMOF,10,S);Sig; [Name =Histogram; linestyle=Histogram; color=crimson]hst:=CMOF - Sig; if (ma(hst,3) < ref(ma(hst,3),-1),hst,undefined);[color =lime green]if (ma(hst,3) > ref(ma(hst,3),-1),hst,undefined);Edited by maximo - 27 Mar 2009 at 1:43pm |
|
![]() |
|
maximo ![]() BullCharts Guru ![]() ![]() Joined: 02 Sep 2006 Location: Australia Posts: 232 |
![]() ![]() ![]() ![]() |
My guess is the 200 is a maximum value for the indicator and 1 would be the minimum. No need to put limits on our settings :P
|
|
![]() |
|
jalna ![]() Regular ![]() Joined: 31 Mar 2007 Posts: 95 |
![]() ![]() ![]() ![]() |
Thanks Maximo yet again. What would we all do without you ?
I noticed in the formula that you have left out 200 in the first 2 lines. Was this not needed for the BC formula ? |
|
![]() |
|
maximo ![]() BullCharts Guru ![]() ![]() Joined: 02 Sep 2006 Location: Australia Posts: 232 |
![]() ![]() ![]() ![]() |
Sure Jalna, [Description ="Tushar Chande's variable-length moving average (VIDYA)"][target =price; color=Magenta; width=2]Length:= Input("Length",21,1);Smooth:= Input("Smoothing",5,0);AbsCMO:=( Abs(CMO(C,Length)))/100;SC:=2/(Smooth+1); VIDYA:= If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV);VIDYA Edited by maximo - 27 Mar 2009 at 2:04am |
|
![]() |
|
jalna ![]() Regular ![]() Joined: 31 Mar 2007 Posts: 95 |
![]() ![]() ![]() ![]() |
Can anyone write the code for this MA by Tushar Chande
Vidya 21, 5This is the
MetaStock code for VIDYA 21,5 which applies to the article "Breaking Out Of
Price Channels" by Gerald Marisch in the TASC January 1998
edition. |
|
![]() |
Post Reply ![]() |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |