Chande Momentum Oscillator.afl
上传用户:shiqiang
上传日期:2009-06-12
资源大小:1289k
文件大小:1k
源码类别:

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Chande Momentum Oscillator
  4. //  Author/Uploader: Jayson Casavant 
  5. //  E-mail:          jcasavant@adelphia.net
  6. //  Date/Time Added: 2002-12-09 01:34:00
  7. //  Origin:          Tushar Chande
  8. //  Keywords:        Momentum
  9. //  Level:           basic
  10. //  Flags:           indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=239
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=239
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  The CMO is closely related to, yet unique from, other momentum oriented
  17. //  indicators such as Relative Strength Index, Stochastic, Rate-of-Change,
  18. //  etc. It is most closely related to Welles Wilder’s RSI, yet it
  19. //  differs in several ways. For a nice description of the indicator and
  20. //  interpretation visit
  21. //
  22. //  http://www.paritech.com/education/technical/indicators/momentum/chande.asp
  23. //
  24. //------------------------------------------------------------------------------
  25. cmopds=20;
  26. CMO_1=Sum( IIf( C > Ref( C, -1 ) , ( C - Ref( C ,-1 ) ) ,0 ) ,cmopds ) ;
  27. CMO_2=Sum( IIf( C < Ref( C ,-1 ) , ( Ref( C ,-1 ) - C )  ,0 ) ,cmopds );
  28. CMO=100 * (( CMO_1 -CMO_2)  /( CMO_1+CMO_2));
  29. Plot(Cmo,"CMO",IIf(cmo>Ref(cmo,-1),5,4),2|styleThick);
  30. Plot(MA(Cmo,9),"Trigger",colorYellow);
  31. Plot(50,"",15);
  32. Plot(-50,"",15);
  33. Title="CMO"+WriteVal(Cmo)+"   Trigger"+WriteVal(MA(Cmo,9));