Chande Momentum Osc

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Chande Momentum Osc

Post by henry1224 »

here is the indicator

Under the parameters tab

Per1 double 5 2 100


inc:= if(C > Ref(C,1) , C - Ref(C,1),0);
dec:= if(ref(C,1) > C , Ref(C,1)- C, 0);
sumInc:= sum(inc, length);
sumDec:= sum(dec, length);
B:=if(sumInc + sumDec == 0 , 0 , (sumInc - sumDec) / (sumInc + sumDec) * 100);
Signal: MA(B,5),ColorBlue;
Con1:= B >= 0;
Con2:= B < 0;
Con3:= B > Ref(B,1);
Con4:= B < Ref(B,1);
BullRise: If(Con1 & Con3, B,0),ColorLime;
BullFall: If(Con1 & Con4, B,0),ColorGreem;
BearFall: If(Con2 & Con4, B,0),ColorRed;
BearRise: If(Con2 & Con3, B,0),ColorDarkRed;
Fifty:50,ColorBlack;
ZeroLine:0,ColorBlack;
NFifty:-50,ColorBlack;
UpperZone: MA(B,34)+(1.3185*Std(B,34)),Width2,ColorViolet;
LowerZone: MA(B,34)-(1.3185*Std(B,34)),Width2,ColorViolet;
FillRgn(1,BullRise,0),Brush#5000FF00;
FillRgn(1,BullFall,0),Brush#50006400;
FillRgn(1,BearRise,0),Brush#508B0000;
FillRgn(1,BearFall,0),Brush#50FF0000;
Last edited by henry1224 on Wed Jun 22, 2016 5:22 pm, edited 1 time in total.
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Re: Chande Momentum Osc

Post by henry1224 »

This version is double smoothed

Under the parameters tab

Per1 double 5 2 100


momu:=If(C>Ref(C,1),C-Ref(C,1),0);
momd:=If(C<Ref(C,1),Ref(C,1)-C,0);
B:=MA(MA(100*((Sum(Momu,Per1)-Sum(Momd,Per1))
/(Sum(Momu,Per1)+Sum(Momd,Per1))),2),2);
Signal: MA(B,5),ColorBlue;
Con1:= B >= 0;
Con2:= B < 0;
Con3:= B > Ref(B,1);
Con4:= B < Ref(B,1);
BullRise: If(Con1 & Con3, B,0),ColorLime;
BullFall: If(Con1 & Con4, B,0),ColorGreem;
BearFall: If(Con2 & Con4, B,0),ColorRed;
BearRise: If(Con2 & Con3, B,0),ColorDarkRed;
Fifty:50,ColorBlack;
ZeroLine:0,ColorBlack;
NFifty:-50,ColorBlack;
UpperZone: MA(B,34)+(1.3185*Std(B,34)),Width2,ColorViolet;
LowerZone: MA(B,34)-(1.3185*Std(B,34)),Width2,ColorViolet;
FillRgn(1,BullRise,0),Brush#5000FF00;
FillRgn(1,BullFall,0),Brush#50006400;
FillRgn(1,BearRise,0),Brush#508B0000;
FillRgn(1,BearFall,0),Brush#50FF0000;
Last edited by henry1224 on Wed Jun 22, 2016 5:22 pm, edited 1 time in total.
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Re: Chande Momentum Osc

Post by henry1224 »

This version is double smoothed and filtered

Under the parameters tab

Per1 double 5 2 100


momu:=If(C>Ref(C,1),C-Ref(C,1),0);
momd:=If(C<Ref(C,1),Ref(C,1)-C,0);
A1:=Std(momu,100);
A2:=Std(momd,100);
Mup:=If(C-Ref(C,1)>A1,C-Ref(C,1),A1);
Mdn:=If(Ref(C,1)-C>A2,Ref(C,1)-C,A2);
B:=MA(MA(100*((Sum(Mup,Per1)-Sum(Mdn,Per1))
/(Sum(Mup,Per1)+Sum(Mdn,Per1))),2),2);
Signal: MA(B,5),ColorBlue;
Con1:= B >= 0;
Con2:= B < 0;
Con3:= B > Ref(B,1);
Con4:= B < Ref(B,1);
BullRise: If(Con1 & Con3, B,0),ColorLime;
BullFall: If(Con1 & Con4, B,0),ColorGreem;
BearFall: If(Con2 & Con4, B,0),ColorRed;
BearRise: If(Con2 & Con3, B,0),ColorDarkRed;
Fifty:50,ColorBlack;
ZeroLine:0,ColorBlack;
NFifty:-50,ColorBlack;
UpperZone: MA(B,34)+(1.3185*Std(B,34)),Width2,ColorViolet;
LowerZone: MA(B,34)-(1.3185*Std(B,34)),Width2,ColorViolet;
FillRgn(1,BullRise,0),Brush#5000FF00;
FillRgn(1,BullFall,0),Brush#50006400;
FillRgn(1,BearRise,0),Brush#508B0000;
FillRgn(1,BearFall,0),Brush#50FF0000;
Last edited by henry1224 on Wed Jun 22, 2016 5:21 pm, edited 1 time in total.
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Re: Chande Momentum Osc

Post by henry1224 »

This version is double smoothed and takes in Volatility

Under the parameters tab

Per1 double 5 2 100
Per2 double 10 3 100
Per3 double 20 4 100
SPer double 3 2 100

momu:=If(C>Ref(C,1),C-Ref(C,1),0);
momd:=If(C<Ref(C,1),Ref(C,1)-C,0);
A1:=MA(MA(100*((Sum(Momu,Per1)-Sum(Momd,Per1))
/(Sum(Momu,Per1)+Sum(Momd,Per1))),2),2);
A2:=MA(MA(100*((Sum(Momu,Per2)-Sum(Momd,Per2))
/(Sum(Momu,Per2)+Sum(Momd,Per2))),2),2);
A3:=MA(MA(100*((Sum(Momu,Per3)-Sum(Momd,Per3))
/(Sum(Momu,Per3)+Sum(Momd,Per3))),2),2);
K1:=Std(A1,Per1);
K2:=Std(A2,Per2);
K3:=Std(A3,Per3);
B:=((K1*A1)+(K2*A2)+(K3*A3))/(K1+K2+K3);
Signal: MA(B,SPer),ColorBlue;
Con1:= B >= 0;
Con2:= B < 0;
Con3:= B > Ref(B,1);
Con4:= B < Ref(B,1);
BullRise: If(Con1 & Con3, B,0),ColorLime;
BullFall: If(Con1 & Con4, B,0),ColorGreem;
BearFall: If(Con2 & Con4, B,0),ColorRed;
BearRise: If(Con2 & Con3, B,0),ColorDarkRed;
Fifty:50,ColorBlack;
ZeroLine:0,ColorBlack;
NFifty:-50,ColorBlack;
UpperZone: MA(B,34)+(1.3185*Std(B,34)),Width2,ColorViolet;
LowerZone: MA(B,34)-(1.3185*Std(B,34)),Width2,ColorViolet;
FillRgn(1,BullRise,0),Brush#5000FF00;
FillRgn(1,BullFall,0),Brush#50006400;
FillRgn(1,BearRise,0),Brush#508B0000;
FillRgn(1,BearFall,0),Brush#50FF0000;
Post Reply