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

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Sainath Sidgiddi
  4. //  Author/Uploader: Sainath 
  5. //  E-mail:          sailis20@yahoo.com
  6. //  Date/Time Added: 2004-11-07 06:32:34
  7. //  Origin:          Sniper Trading-
  8. //  Keywords:        Sniper trading
  9. //  Level:           basic
  10. //  Flags:           exploration,indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=398
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=398
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  SNiper trading emphasizes on day of week trading, rather than trading every
  17. //  day.Good stuff for those int in day trading and taking positions.
  18. //
  19. //------------------------------------------------------------------------------
  20. R1=(MA(H,3)-MA(Ref(L,-1),3))+L;
  21. R2=((MA(Ref(H,-1),3))-MA(H,3))+H;
  22. R3=H;
  23. R4=2*Avg-L;
  24. Sellno=(R1+R2+R3+R4)/4;
  25. S1=H-(MA(Ref(H,-1),3)-MA(L,3));
  26. S2=L-(MA(Ref(L,-1),3)-MA(L,3));
  27. s3=L;
  28. S4=2*Avg-H;
  29. Buyno=(S1+S2+S3+S4)/4;
  30. //1-Day strength
  31. DS1=(C-L)/(H-L)*100;
  32. //5-Day Strength
  33. DS5=(C-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100;
  34. //LSS-5Day Oscillator
  35. X=HHV(H,5)-Ref(O,-5);
  36. Y=C-LLV(L,5);
  37. LSSO=(X+Y)/((HHV(H,5)-LLV(L,5))*2);
  38. AvgLSSO=MA(LSSO,3)*100;
  39. //Momentum
  40. Mom=AvgLSSO-Ref(AvgLSSO,-3);
  41. Condb1=94.5<DS5>65 AND LSSO>50 AND mom>-10;
  42. Condb2=DS5<83 AND LSSO<50 AND mom>-40;
  43. Conds1=DS5>53 AND LSSO<70 AND mom>-10;
  44. Buy=IIf(Cross(DS5,80),Condb1,DayOfWeek()==1);
  45. Sell=IIf(Cross(20,DS5),Condb2,DayOfWeek()==3);
  46. Filter=Buyno AND  Sellno;
  47. AddColumn(Buyno,"BuyNo");
  48. AddColumn(Sellno,"SellNo");
  49. AddColumn(DS1,"1-Day Strength");
  50. AddColumn(DS5,"5-Day Strength");
  51. AddColumn(AvgLSSO,"AVg LSS 5-Day OSC ");
  52. AddColumn(Mom,"Momentum ");