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

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Support and Resistance
  4. //  Author/Uploader: Prakash Shenoi 
  5. //  E-mail:          
  6. //  Date/Time Added: 2006-09-19 11:06:24
  7. //  Origin:          
  8. //  Keywords:        Support and Resistance
  9. //  Level:           basic
  10. //  Flags:           indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=712
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=712
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  Simple support and resistance indicator with lookback variable input.
  17. //
  18. //------------------------------------------------------------------------------
  19. /* SUPPORT AND RESISTANCE */
  20. /* AFL Code - Prakash Shenoi */
  21. LB= Param("Look Back Periods",10,1,30,1);
  22. R=ValueWhen(Cross(MA(C,LB),C),HHV(H,LB),1);
  23. S=ValueWhen(Cross(C,MA(C,LB)),LLV(L,LB),1);
  24. Color=IIf(O>C,colorBlack,colorYellow);
  25. Plot (R,"Resz",22,8+16);
  26. Plot (s,"Supp",19,8+16);
  27. Plot (C,"Close",color,64,32);
  28. GraphXSpace=4;