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

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    AccuTrack
  4. //  Author/Uploader: Salil V Gangal 
  5. //  E-mail:          salil_gangal@yahoo.com
  6. //  Date/Time Added: 2003-09-12 12:50:01
  7. //  Origin:          FastTrack
  8. //  Keywords:        AccuTrack
  9. //  Level:           basic
  10. //  Flags:           indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=298
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=298
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  // AccuTrack Compares performance of two securities
  17. //
  18. //  // The basic idea is to switch between the two securities
  19. //
  20. //  // AccuTrack was developed by FastTrack (fasttrack.net)
  21. //
  22. //------------------------------------------------------------------------------
  23. // AccuTrack Compares performance of two securities
  24. // The basic idea is to switch between the two securities
  25. // AccuTrack was developed by FastTrack (http://fasttrack.net)
  26. // Following is the Indicator Builder Formula
  27. fnd = Name();
  28. ind = "FDRXX";      // FDRXX is money market fund, so the comparison is done with cash.
  29. fund = Foreign(fnd, "Close");
  30. index = Foreign(ind, "Close");
  31. fast = 6;
  32. slow = 24;
  33. RawAT = EMA((EMA(ROC(fund,1), slow) - EMA(ROC(index,1),slow)),fast); 
  34. tradeAccuTrack = RawAT * 265;
  35. Plot(tradeAccuTrack, "tradeAccuTrack", colorBlue, styleLine);
  36. Title =   Date()
  37.         + "  Trade AccuTrack of "
  38.         + fnd
  39.         +" / "
  40.         + ind 
  41.         + " = " + WriteVal(tradeAccuTrack, 1.2) + " ";
  42. GraphXSpace = 2;