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

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Bollinger Fibonacci Bands
  4. //  Author/Uploader: Beachie41 
  5. //  E-mail:          beachie41@ihug.com.au
  6. //  Date/Time Added: 2004-11-28 12:34:20
  7. //  Origin:          
  8. //  Keywords:        
  9. //  Level:           basic
  10. //  Flags:           indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=407
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=407
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  Boll-Fib bands as used on the VT Forex trading platform
  17. //
  18. //------------------------------------------------------------------------------
  19. // Bollinger Fibonacci Bands - Beachie41 26/11/04 //
  20. /* as used in the VT trading platform - 
  21.  see outline of FX trading system by mezarashii on
  22. Moneytec http://www.moneytec.com/forums/_showthread/_threadid-11630/_s-
  23.  */
  24. GraphXSpace = 3;
  25. per = Param("Period",20,10,55,1);
  26. TH =IIf(Ref(C,-1) > H,Ref(C,-1),H);
  27. TL=IIf(Ref(C,-1) < L,Ref(C,-1),L);
  28. TR = TH-TL;
  29. TRa= Wilders(TR,per);
  30. UpperBand3 =MA( C, per) + ( 4.2360 * TRa);
  31. UpperBand2=MA( C, per) + ( 2.6180 * TRa);
  32. UpperBand1=MA( C, per) + ( 1.6180 * TRa);
  33. MidPoint=MA(C, per);
  34. LowerBand1=MA( C, per) - ( 1.6180 * TRa);
  35. LowerBand2=MA( C, per) - ( 2.6180 * TRa);
  36. LowerBand3=MA( C, per) - ( 4.2360 * TRa);
  37. Plot(MidPoint,"",colorGreen,4);
  38. Plot(UpperBand1,"",colorRed,1);
  39. Plot(LowerBand1,"",colorRed,1);
  40. Plot(UpperBand2,"",colorAqua,1);
  41. Plot(LowerBand2,"",colorAqua,1);
  42. Plot(UpperBand3,"",colorYellow,1);
  43. Plot(LowerBand3,"",colorYellow,1);
  44. PlotOHLC(O,H,L,C,"",colorWhite,64);