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

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Pivot Point and Support and Resistance Points
  4. //  Author/Uploader: Anthony Faragasso 
  5. //  E-mail:          ajf1111@epix.net
  6. //  Date/Time Added: 2002-04-25 09:04:53
  7. //  Origin:          
  8. //  Keywords:        
  9. //  Level:           basic
  10. //  Flags:           commentary
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=186
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=186
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  Guru Commentary, provides Pivot and support and resistance
  17. //
  18. //  points for the Next trading day.
  19. //
  20. //------------------------------------------------------------------------------
  21. /* Pivot points and Support and Resistance Points*/
  22. /* for next day trading*/
  23. /* coded by Anthony Faragasso */
  24. MaxGraph =8;
  25. p = (H+L+C)/3;
  26. r1 = (2*p)-L;
  27. s1 = (2*p)-H;
  28. r2 = p +(r1 - s1);
  29. s2 = p -(r2 - s1);
  30. Graph0=p;
  31. Graph1=r1;
  32. Graph2 = s1;
  33. Graph3= r2;
  34. Graph4 = s2;
  35. Graph0Style = Graph1Style = Graph2Style = Graph3Style = Graph4Style = 16 + 8;
  36. Graph0Color = 2;
  37. Graph1Color = Graph2Color = 8;
  38. Graph3Color = Graph4Color = 6;
  39.  
  40. Graph5 = Close;
  41. Graph5Color = 3;
  42. Graph5Style = 128;
  43. "";
  44. "------------------------------------------------------------------------------------------------------------";
  45. "    PIVOT POINTS AND SUPPORT AND RESISTANCE POINTS ";
  46. "------------------------------------------------------------------------------------------------------------";
  47. "";
  48. "MARKET BEING EVALUATED :  " + Title = Name() + "      DATE : "  + Date();
  49. "";
  50. "TODAY'S CLOSE WAS : "+"( " +WriteVal(Close,format=1.2)+" )";
  51. "----------------------------------------------------------------------------------------------------------------------";
  52. "    *******  THESE POINTS ARE VALID FOR NEXT TRADING DAY ******";
  53. "-----------------------------------------------------------------------------------------------------------------------";
  54. "RESISTENCE POINT 2 : ----------------" +WriteVal(Graph3,format=1.2);
  55. "";
  56. "RESISTENCE POINT 1 : ----------------" +WriteVal(Graph1,format=1.2);
  57. "";
  58. " --------------------------------------------------------"+ "("+WriteVal(Graph0,format=1.2)+")" +"   PIVOT POINT--------";
  59. "";
  60. "SUPPORT POINT 1 : ----------------------" +WriteVal(Graph2,format=1.2);
  61. "";
  62. "SUPPORT POINT 2 : ----------------------" +WriteVal(Graph4,format=1.2);