[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CMO



PureBytes Links

Trading Reference Links

Hi Cordell
Here's the CMO Indicator
I've one with colored lines in the overbought/oversold Range and 
another with colored bars.

/* CMO with colored lines */
/* Set the scale to -100 to +100 */
Overbought = 90; Oversold = -90; Pds = 5;

title = "109 CMO "+ " " + "periods:" + " " 
+ writeval(pds, FORMAT = 1.0)+" " + name () + " " + fullname
() ;

CMO = 
100*((Sum(IIf(C > Ref(C,-1),(C-Ref(C,-1)),0),pds)) -
(Sum(IIf(C < REF(C,-1),(REF(C,-1)-C),0),pds))) /
((Sum(IIf(C > Ref(C,-1),(C-Ref(C,-1)),0),pds)
+(Sum(IIf(C < REF(C,-1),(REF(C,-1)-C),0),pds)))) ;

maxgraph = 10;

graph1 = CMO; graph1color = 2; graph1style = 4;
graph0 = -50;
graph2 = 50; graph2color = 5; graph2style = 5;

graph1barcolor = IIF (graph1 > Overbought, 4, 
IIF (graph1 < Oversold,5,6));

buy = CMO < -90 and cci(45) > 10;

sell = barssince (buy) == 3;

filter = buy;
numcolumns = 1;
column0 = roc (c,1);
buy = ExRem( buy, sell );


/* CMO with colored bars */
/* Set the scale to -100 to +100 */


Overbought = 90; Oversold = -90; Pds = 5;

title = "109 CMO "+ " " + "periods:" + " " 
+ writeval(pds, FORMAT = 1.0)+" " + name () + " " + fullname
() ;

CMO = 
100*((Sum(IIf(C > Ref(C,-1),(C-Ref(C,-1)),0),pds)) -
(Sum(IIf(C < REF(C,-1),(REF(C,-1)-C),0),pds))) /
((Sum(IIf(C > Ref(C,-1),(C-Ref(C,-1)),0),pds)
+(Sum(IIf(C < REF(C,-1),(REF(C,-1)-C),0),pds)))) ;

maxgraph = 10;

graph1 = CMO; graph1color = 2; graph1style = 2+4;
graph0 = -50;
graph2 = 50; graph2color = 5; graph2style = 5;

graph1barcolor = IIF (graph1 > Overbought, 4, 
IIF (graph1 < Oversold,5,6));

buy = CMO < -90 and cci(45) > 10;

sell = barssince (buy) == 3;

filter = buy;
numcolumns = 1;
column0 = roc (c,1);
buy = ExRem( buy, sell );


I hope it helps you.
I think the 5 periods are very useful.

Tom Supera





--- In amibroker@xxxx, ct1942@xxxx wrote:
> I'm not good at writing fomulas in AFL.
> 
> If anyone has written the AFL formula for Chande's Momentum 
> Osillator, I would sure appreciate you posting it.
> 
> Thanks in adcance, 
> 
> Cordell






  • References:
    • CMO
      • From: ct1942