chande momentum oscillator.afl

来自「一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台」· AFL 代码 · 共 35 行

AFL
35
字号
//------------------------------------------------------------------------------
//
//  Formula Name:    Chande Momentum Oscillator
//  Author/Uploader: Jayson Casavant 
//  E-mail:          jcasavant@adelphia.net
//  Date/Time Added: 2002-12-09 01:34:00
//  Origin:          Tushar Chande
//  Keywords:        Momentum
//  Level:           basic
//  Flags:           indicator
//  Formula URL:     http://www.amibroker.com/library/formula.php?id=239
//  Details URL:     http://www.amibroker.com/library/detail.php?id=239
//
//------------------------------------------------------------------------------
//
//  The CMO is closely related to, yet unique from, other momentum oriented
//  indicators such as Relative Strength Index, Stochastic, Rate-of-Change,
//  etc. It is most closely related to Welles Wilder’s RSI, yet it
//  differs in several ways. For a nice description of the indicator and
//  interpretation visit
//
//  http://www.paritech.com/education/technical/indicators/momentum/chande.asp
//
//------------------------------------------------------------------------------

cmopds=20;
CMO_1=Sum( IIf( C > Ref( C, -1 ) , ( C - Ref( C ,-1 ) ) ,0 ) ,cmopds ) ;
CMO_2=Sum( IIf( C < Ref( C ,-1 ) , ( Ref( C ,-1 ) - C )  ,0 ) ,cmopds );

CMO=100 * (( CMO_1 -CMO_2)  /( CMO_1+CMO_2));
Plot(Cmo,"CMO",IIf(cmo>Ref(cmo,-1),5,4),2|styleThick);
Plot(MA(Cmo,9),"Trigger",colorYellow);
Plot(50,"",15);
Plot(-50,"",15);
Title="CMO"+WriteVal(Cmo)+"   Trigger"+WriteVal(MA(Cmo,9));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?