设为首页 收藏本站 切换语言

【四周期均线】谁能解释下这个指标的用法和意义

| 发表于 2024-2-22 17:31:37 | 显示全部楼层 |复制链接
谁能解释下这个指标的用法和意义
1.png

无标题.png


  1. #property indicator_chart_window
  2. //----
  3. extern int p1_ma=5;//Period() in minutes
  4. extern int p2_ma=15;//Period() in minutes
  5. extern int p3_ma=60;//Period() in minutes
  6. extern int p4_ma=240;//Period() in minutes
  7. extern int STD_Rgres_length=56;
  8. extern double STD_width=0.809;
  9. extern int ma_applied_price=1;
  10. /*
  11. Applied price constants. It can be any of the following values:
  12. Constant       Value Description
  13. PRICE_CLOSE    0     Close price.
  14. PRICE_OPEN     1     Open price.
  15. PRICE_HIGH     2     High price.
  16. PRICE_LOW      3     Low price.
  17. PRICE_MEDIAN   4     Median price, (high+low)/2.
  18. PRICE_TYPICAL  5     Typical price, (high+low+close)/3.
  19. PRICE_WEIGHTED 6     Weighted close price, (high+low+close+close)/4.
  20. */
  21. extern int ma_Method=0;
  22. /*
  23. Moving Average Method
  24. Constant    Value Description
  25. MODE_SMA    0     Simple moving average,
  26. MODE_EMA    1     Exponential moving average,
  27. MODE_SMMA   2     Smoothed moving average,
  28. MODE_LWMA   3     Linear weighted moving average.  
  29. */
  30. extern int ma1_Length=13;
  31. extern int ma2_Length=21;
  32. extern int ma3_Length=34;
  33. extern int ma4_Length=55;
  34. extern int ma5_Length=89;
  35. extern int ma6_Length=144;
  36. extern int ma7_Length=233;
  37. //----
  38. extern int fib_SR_shadow_1=13;
  39. extern int fib_SR_shadow_2=21;
  40. extern int fib_SR_shadow_3=34;
  41. extern int fib_SR_shadow_4=55;
  42. extern int fib_SR_shadow_5=89;
  43. extern int fib_SR_shadow_6=144;
  44. extern int fib_SR_shadow_7=233;
  45. //----
  46. extern color fib_SR_shadow_1_c=AliceBlue;
  47. extern color fib_SR_shadow_2_c=LightBlue;
  48. extern color fib_SR_shadow_3_c=DodgerBlue;
  49. extern color fib_SR_shadow_4_c=RoyalBlue;
  50. extern color fib_SR_shadow_5_c=Blue;
  51. extern color fib_SR_shadow_6_c=MediumBlue;
  52. extern color fib_SR_shadow_7_c=DarkBlue;
  53. //----
  54. double ma1_p1, ma2_p1, ma3_p1, ma4_p1, ma5_p1, ma6_p1, ma7_p1;
  55. double ma1_p2, ma2_p2, ma3_p2, ma4_p2, ma5_p2, ma6_p2, ma7_p2;
  56. double ma1_p3, ma2_p3, ma3_p3, ma4_p3, ma5_p3, ma6_p3, ma7_p3;
  57. double ma1_p4, ma2_p4, ma3_p4, ma4_p4, ma5_p4, ma6_p4, ma7_p4;
  58. //----
  59. datetime t1_p1, t2_p1, t1_p2, t2_p2, t1_p3, t2_p3, t1_p4, t2_p4;
  60. //+------------------------------------------------------------------+
  61. //|                                                                  |
  62. //+------------------------------------------------------------------+
  63. int init()
  64.   {  return(0);
  65.   }
  66. //+------------------------------------------------------------------+
  67. //|                                                                  |
  68. //+------------------------------------------------------------------+
  69.   int deinit()
  70.   {
  71.    ObjectsDeleteAll(0,OBJ_TEXT);ObjectsDeleteAll(0,OBJ_RECTANGLE);
  72.    ObjectsDeleteAll(0,OBJ_ARROW);ObjectsDeleteAll(0,OBJ_TREND);
  73.    return(0);
  74.   }
  75. //+------------------------------------------------------------------+
  76. //|                                                                  |
  77. //+------------------------------------------------------------------+
  78.   int start()
  79.   {
  80.    ObjectsDeleteAll();
  81.    ObjectCreate("regression channel",OBJ_REGRESSION,0,Time[STD_Rgres_length],Bid,Time[0],Ask);
  82.    ObjectSet("regression channel",OBJPROP_RAY,true);
  83.    ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,Time[STD_Rgres_length],Bid,Time[0],Ask);
  84.    ObjectSet("std channel",OBJPROP_DEVIATION,STD_width);
  85.    ObjectSet("std channel",OBJPROP_COLOR,Olive);
  86.    ObjectSet("std channel",OBJPROP_RAY,true);
  87.    //p1 ma settings
  88.    ma1_p1=iMA(Symbol(),p1_ma,ma1_Length,0,ma_Method,ma_applied_price,0);
  89.    ma2_p1=iMA(Symbol(),p1_ma,ma2_Length,0,ma_Method,ma_applied_price,0);
  90.    ma3_p1=iMA(Symbol(),p1_ma,ma3_Length,0,ma_Method,ma_applied_price,0);
  91.    ma4_p1=iMA(Symbol(),p1_ma,ma4_Length,0,ma_Method,ma_applied_price,0);
  92.    ma5_p1=iMA(Symbol(),p1_ma,ma5_Length,0,ma_Method,ma_applied_price,0);
  93.    ma6_p1=iMA(Symbol(),p1_ma,ma6_Length,0,ma_Method,ma_applied_price,0);
  94.    ma7_p1=iMA(Symbol(),p1_ma,ma7_Length,0,ma_Method,ma_applied_price,0);
  95. //--------------
  96.    //p2 ma settings
  97.    ma1_p2=iMA(Symbol(),p2_ma,ma1_Length,0,ma_Method,ma_applied_price,0);
  98.    ma2_p2=iMA(Symbol(),p2_ma,ma2_Length,0,ma_Method,ma_applied_price,0);
  99.    ma3_p2=iMA(Symbol(),p2_ma,ma3_Length,0,ma_Method,ma_applied_price,0);
  100.    ma4_p2=iMA(Symbol(),p2_ma,ma4_Length,0,ma_Method,ma_applied_price,0);
  101.    ma5_p2=iMA(Symbol(),p2_ma,ma5_Length,0,ma_Method,ma_applied_price,0);
  102.    ma6_p2=iMA(Symbol(),p2_ma,ma6_Length,0,ma_Method,ma_applied_price,0);
  103.    ma7_p2=iMA(Symbol(),p2_ma,ma7_Length,0,ma_Method,ma_applied_price,0);
  104. //--------------
  105.    //p3 ma settings
  106.    ma1_p3=iMA(Symbol(),p3_ma,ma1_Length,0,ma_Method,ma_applied_price,0);
  107.    ma2_p3=iMA(Symbol(),p3_ma,ma2_Length,0,ma_Method,ma_applied_price,0);
  108.    ma3_p3=iMA(Symbol(),p3_ma,ma3_Length,0,ma_Method,ma_applied_price,0);
  109.    ma4_p3=iMA(Symbol(),p3_ma,ma4_Length,0,ma_Method,ma_applied_price,0);
  110.    ma5_p3=iMA(Symbol(),p3_ma,ma5_Length,0,ma_Method,ma_applied_price,0);
  111.    ma6_p3=iMA(Symbol(),p3_ma,ma6_Length,0,ma_Method,ma_applied_price,0);
  112.    ma7_p3=iMA(Symbol(),p3_ma,ma7_Length,0,ma_Method,ma_applied_price,0);
  113. //--------------
  114.    //p4 ma settings
  115.    ma1_p4=iMA(Symbol(),p4_ma,ma1_Length,0,ma_Method,ma_applied_price,0);
  116.    ma2_p4=iMA(Symbol(),p4_ma,ma2_Length,0,ma_Method,ma_applied_price,0);
  117.    ma3_p4=iMA(Symbol(),p4_ma,ma3_Length,0,ma_Method,ma_applied_price,0);
  118.    ma4_p4=iMA(Symbol(),p4_ma,ma4_Length,0,ma_Method,ma_applied_price,0);
  119.    ma5_p4=iMA(Symbol(),p4_ma,ma5_Length,0,ma_Method,ma_applied_price,0);
  120.    ma6_p4=iMA(Symbol(),p4_ma,ma6_Length,0,ma_Method,ma_applied_price,0);
  121.    ma7_p4=iMA(Symbol(),p4_ma,ma7_Length,0,ma_Method,ma_applied_price,0);
  122. //--------------
  123.    Time_Coordinate_Set();
  124.    p1_Fib_Plot();
  125.    p2_Fib_Plot();
  126.    p3_Fib_Plot();
  127.    p4_Fib_Plot();
  128.    column();
  129. //--------------
  130.   return(0);}
  131. //+------------------------------------------------------------------+
  132.   void Time_Coordinate_Set()
  133.   {
  134.    //....Variable Settings for Object Spatial Placement.....
  135.    double zoom_multiplier;int bpw=BarsPerWindow();
  136.    if(bpw<25)              {zoom_multiplier=0.05;}
  137.    if(bpw>25 && bpw<50)    {zoom_multiplier=0.07;}
  138.    if(bpw>50 && bpw<175)   {zoom_multiplier=0.12;}
  139.    if(bpw>175 && bpw<375)  {zoom_multiplier=0.25;}
  140.    if(bpw>375 && bpw<750)  {zoom_multiplier=0.5;}
  141.    if(bpw>750)             {zoom_multiplier=1;}
  142.    double time_frame_multiplier;
  143.    if(Period()==1)      {time_frame_multiplier=0.65;}
  144.    if(Period()==5)      {time_frame_multiplier=3.25;}
  145.    if(Period()==15)     {time_frame_multiplier=9.75;}
  146.    if(Period()==30)     {time_frame_multiplier=19.5;}
  147.    if(Period()==60)     {time_frame_multiplier=39;}
  148.    if(Period()==240)    {time_frame_multiplier=156;}
  149.    if(Period()==1440)   {time_frame_multiplier=936;}
  150.    if(Period()==10080)  {time_frame_multiplier=6552;}
  151.    if(Period()==43200)  {time_frame_multiplier=28043;}
  152. //----
  153.    t1_p1=Time[0]+(1000*time_frame_multiplier*zoom_multiplier);
  154.    t2_p1=Time[0]+(3000*time_frame_multiplier*zoom_multiplier);
  155. //----
  156.    t1_p2=Time[0]+(5000*time_frame_multiplier*zoom_multiplier);
  157.    t2_p2=Time[0]+(7000*time_frame_multiplier*zoom_multiplier);
  158. //----
  159.    t1_p3=Time[0]+(9000*time_frame_multiplier*zoom_multiplier);
  160.    t2_p3=Time[0]+(11000*time_frame_multiplier*zoom_multiplier);
  161. //----
  162.    t1_p4=Time[0]+(13000*time_frame_multiplier*zoom_multiplier);
  163.   t2_p4=Time[0]+(16000*time_frame_multiplier*zoom_multiplier);}//end Time_Coordinate_Set()
  164. //----
  165.   void p1_Fib_Plot()
  166.   {
  167.    //p1 dynamic fibo levels
  168.    double lo_ma_p1,hi_ma_p1;
  169.    lo_ma_p1=ma1_p1;
  170.    if(ma2_p1<lo_ma_p1)  {lo_ma_p1=ma2_p1;}
  171.    if(ma3_p1<lo_ma_p1)  {lo_ma_p1=ma3_p1;}
  172.    if(ma4_p1<lo_ma_p1)  {lo_ma_p1=ma4_p1;}
  173.    if(ma5_p1<lo_ma_p1)  {lo_ma_p1=ma5_p1;}
  174.    if(ma6_p1<lo_ma_p1)  {lo_ma_p1=ma6_p1;}
  175.    if(ma7_p1<lo_ma_p1)  {lo_ma_p1=ma7_p1;}
  176.    lo_ma_p1=NormalizeDouble(lo_ma_p1+(fib_SR_shadow_1*Point),Digits);
  177. //----
  178.    hi_ma_p1=ma7_p1;
  179.    if(ma6_p1>hi_ma_p1)  {hi_ma_p1=ma6_p1;}
  180.    if(ma5_p1>hi_ma_p1)  {hi_ma_p1=ma5_p1;}
  181.    if(ma4_p1>hi_ma_p1)  {hi_ma_p1=ma4_p1;}
  182.    if(ma3_p1>hi_ma_p1)  {hi_ma_p1=ma3_p1;}
  183.    if(ma2_p1>hi_ma_p1)  {hi_ma_p1=ma2_p1;}
  184.    if(ma1_p1>hi_ma_p1)  {hi_ma_p1=ma1_p1;}
  185.    hi_ma_p1=NormalizeDouble(hi_ma_p1-(fib_SR_shadow_1*Point),Digits);
  186.    //p1 center dynamic fib placement      
  187.    if(lo_ma_p1-hi_ma_p1>Ask-Bid)
  188.      {
  189.       ObjectCreate("lcf_p1",OBJ_TREND,0,t1_p1, lo_ma_p1, t2_p1, lo_ma_p1);
  190.       ObjectSet("lcf_p1",OBJPROP_STYLE,STYLE_SOLID);
  191.       ObjectSet("lcf_p1",OBJPROP_WIDTH,2);
  192.       ObjectSet("lcf_p1",OBJPROP_RAY,false);
  193.       ObjectSet("lcf_p1",OBJPROP_COLOR,fib_SR_shadow_1_c);
  194.       ObjectSetText("lcf_p1",DoubleToStr(lo_ma_p1,Digits),7,"Arial",fib_SR_shadow_1_c);
  195.       //----
  196.       ObjectCreate("hcf_p1",OBJ_TREND,0,t1_p1, hi_ma_p1, t2_p1, hi_ma_p1);
  197.       ObjectSet("hcf_p1",OBJPROP_STYLE,STYLE_SOLID);
  198.       ObjectSet("hcf_p1",OBJPROP_WIDTH,2);
  199.       ObjectSet("hcf_p1",OBJPROP_RAY,false);
  200.       ObjectSet("hcf_p1",OBJPROP_COLOR,fib_SR_shadow_1_c);
  201.       ObjectSetText("hcf_p1",DoubleToStr(hi_ma_p1,Digits),7,"Arial",fib_SR_shadow_1_c);
  202.      }
  203. //----
  204.    double lo_ma_p1_1, lo_ma_p1_2, lo_ma_p1_3, lo_ma_p1_4, lo_ma_p1_5, lo_ma_p1_6;
  205.    lo_ma_p1_1=lo_ma_p1+(fib_SR_shadow_2*Point);
  206.    lo_ma_p1_2=lo_ma_p1_1+(fib_SR_shadow_3*Point);
  207.    lo_ma_p1_3=lo_ma_p1_2+(fib_SR_shadow_4*Point);
  208.    lo_ma_p1_4=lo_ma_p1_3+(fib_SR_shadow_5*Point);
  209.    lo_ma_p1_5=lo_ma_p1_4+(fib_SR_shadow_6*Point);
  210.    lo_ma_p1_6=lo_ma_p1_5+(fib_SR_shadow_7*Point);
  211. //----
  212.    double hi_ma_p1_1, hi_ma_p1_2, hi_ma_p1_3, hi_ma_p1_4, hi_ma_p1_5, hi_ma_p1_6;
  213.    hi_ma_p1_1=hi_ma_p1-(fib_SR_shadow_2*Point);
  214.    hi_ma_p1_2=hi_ma_p1_1-(fib_SR_shadow_3*Point);
  215.    hi_ma_p1_3=hi_ma_p1_2-(fib_SR_shadow_4*Point);
  216.    hi_ma_p1_4=hi_ma_p1_3-(fib_SR_shadow_5*Point);
  217.    hi_ma_p1_5=hi_ma_p1_4-(fib_SR_shadow_6*Point);
  218.    hi_ma_p1_6=hi_ma_p1_5-(fib_SR_shadow_7*Point);
  219.    //p1 1st level (hi_1_p1, lo_1_p1)
  220.    if(lo_ma_p1_1-hi_ma_p1_1>Ask-Bid)
  221.      {
  222.       ObjectCreate("lo_1_p1",OBJ_TREND,0,t1_p1, lo_ma_p1_1, t2_p1, lo_ma_p1_1);
  223.       ObjectSet("lo_1_p1",OBJPROP_STYLE,STYLE_SOLID);
  224.       ObjectSet("lo_1_p1",OBJPROP_WIDTH,2);
  225.       ObjectSet("lo_1_p1",OBJPROP_RAY,false);
  226.       ObjectSet("lo_1_p1",OBJPROP_COLOR,fib_SR_shadow_2_c);
  227.       ObjectSetText("lo_1_p1",DoubleToStr(lo_ma_p1_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  228.       //----
  229.       ObjectCreate("hi_1_p1",OBJ_TREND,0,t1_p1, hi_ma_p1_1, t2_p1, hi_ma_p1_1);
  230.       ObjectSet("hi_1_p1",OBJPROP_STYLE,STYLE_SOLID);
  231.       ObjectSet("hi_1_p1",OBJPROP_WIDTH,2);
  232.       ObjectSet("hi_1_p1",OBJPROP_RAY,false);
  233.       ObjectSet("hi_1_p1",OBJPROP_COLOR,fib_SR_shadow_2_c);
  234.       ObjectSetText("hi_1_p1",DoubleToStr(hi_ma_p1_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  235.      }
  236.    // 2st level (hi_2_p1, lo_2_p1)
  237.    if(lo_ma_p1_2-hi_ma_p1_2>Ask-Bid)
  238.      {
  239.       ObjectCreate("lo_2_p1",OBJ_TREND,0,t1_p1, lo_ma_p1_2, t2_p1, lo_ma_p1_2);
  240.       ObjectSet("lo_2_p1",OBJPROP_STYLE,STYLE_SOLID);
  241.       ObjectSet("lo_2_p1",OBJPROP_WIDTH,2);
  242.       ObjectSet("lo_2_p1",OBJPROP_RAY,false);
  243.       ObjectSet("lo_2_p1",OBJPROP_COLOR,fib_SR_shadow_3_c);
  244.       ObjectSetText("lo_2_p1",DoubleToStr(lo_ma_p1_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  245.       //----
  246.       ObjectCreate("hi_2_p1",OBJ_TREND,0,t1_p1, hi_ma_p1_2, t2_p1, hi_ma_p1_2);
  247.       ObjectSet("hi_2_p1",OBJPROP_STYLE,STYLE_SOLID);
  248.       ObjectSet("hi_2_p1",OBJPROP_WIDTH,2);
  249.       ObjectSet("hi_2_p1",OBJPROP_RAY,false);
  250.       ObjectSet("hi_2_p1",OBJPROP_COLOR,fib_SR_shadow_3_c);
  251.       ObjectSetText("hi_2_p1",DoubleToStr(hi_ma_p1_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  252.      }
  253.    // 3rd level (hi_3_p1, lo_3_p1)
  254.    if(lo_ma_p1_3-hi_ma_p1_3>Ask-Bid)
  255.      {
  256.       ObjectCreate("lo_3_p1",OBJ_TREND,0,t1_p1, lo_ma_p1_3, t2_p1, lo_ma_p1_3);
  257.       ObjectSet("lo_3_p1",OBJPROP_STYLE,STYLE_SOLID);
  258.       ObjectSet("lo_3_p1",OBJPROP_WIDTH,2);
  259.       ObjectSet("lo_3_p1",OBJPROP_RAY,false);
  260.       ObjectSet("lo_3_p1",OBJPROP_COLOR,fib_SR_shadow_4_c);
  261.       ObjectSetText("lo_3_p1",DoubleToStr(lo_ma_p1_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  262.       //----
  263.       ObjectCreate("hi_3_p1",OBJ_TREND,0,t1_p1, hi_ma_p1_3, t2_p1, hi_ma_p1_3);
  264.       ObjectSet("hi_3_p1",OBJPROP_STYLE,STYLE_SOLID);
  265.       ObjectSet("hi_3_p1",OBJPROP_WIDTH,2);
  266.       ObjectSet("hi_3_p1",OBJPROP_RAY,false);
  267.       ObjectSet("hi_3_p1",OBJPROP_COLOR,fib_SR_shadow_4_c);
  268.       ObjectSetText("hi_3_p1",DoubleToStr(hi_ma_p1_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  269.      }
  270.    // 4th level (hi_4_p1, lo_4_p1)
  271.    if(lo_ma_p1_4-hi_ma_p1_4>Ask-Bid)
  272.      {
  273.       ObjectCreate("lo_4_p1",OBJ_TREND,0,t1_p1, lo_ma_p1_4, t2_p1, lo_ma_p1_4);
  274.       ObjectSet("lo_4_p1",OBJPROP_STYLE,STYLE_SOLID);
  275.       ObjectSet("lo_4_p1",OBJPROP_WIDTH,2);
  276.       ObjectSet("lo_4_p1",OBJPROP_RAY,false);
  277.       ObjectSet("lo_4_p1",OBJPROP_COLOR,fib_SR_shadow_5_c);
  278.       ObjectSetText("lo_4_p1",DoubleToStr(lo_ma_p1_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  279.       //----
  280.       ObjectCreate("hi_4_p1",OBJ_TREND,0,t1_p1, hi_ma_p1_4, t2_p1, hi_ma_p1_4);
  281.       ObjectSet("hi_4_p1",OBJPROP_STYLE,STYLE_SOLID);
  282.       ObjectSet("hi_4_p1",OBJPROP_WIDTH,2);
  283.       ObjectSet("hi_4_p1",OBJPROP_RAY,false);
  284.       ObjectSet("hi_4_p1",OBJPROP_COLOR,fib_SR_shadow_5_c);
  285.       ObjectSetText("hi_4_p1",DoubleToStr(hi_ma_p1_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  286.      }
  287.    // 5th level (hi_5_p1, lo_5_p1)
  288.    if(lo_ma_p1_5-hi_ma_p1_5>Ask-Bid)
  289.      {
  290.       ObjectCreate("lo_5_p1",OBJ_TREND,0,t1_p1, lo_ma_p1_5, t2_p1, lo_ma_p1_5);
  291.       ObjectSet("lo_5_p1",OBJPROP_STYLE,STYLE_SOLID);
  292.       ObjectSet("lo_5_p1",OBJPROP_WIDTH,2);
  293.       ObjectSet("lo_5_p1",OBJPROP_RAY,false);
  294.       ObjectSet("lo_5_p1",OBJPROP_COLOR,fib_SR_shadow_6_c);
  295.       ObjectSetText("lo_5_p1",DoubleToStr(lo_ma_p1_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  296.       //----
  297.       ObjectCreate("hi_5_p1",OBJ_TREND,0,t1_p1, hi_ma_p1_5, t2_p1, hi_ma_p1_5);
  298.       ObjectSet("hi_5_p1",OBJPROP_STYLE,STYLE_SOLID);
  299.       ObjectSet("hi_5_p1",OBJPROP_WIDTH,2);
  300.       ObjectSet("hi_5_p1",OBJPROP_RAY,false);
  301.       ObjectSet("hi_5_p1",OBJPROP_COLOR,fib_SR_shadow_6_c);
  302.       ObjectSetText("hi_5_p1",DoubleToStr(hi_ma_p1_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  303.      }
  304.    // 6th level (hi_6_p1, lo_6_p1)
  305.    if(lo_ma_p1_6-hi_ma_p1_6>Ask-Bid)
  306.      {
  307.       ObjectCreate("lo_6_p1",OBJ_TREND,0,t1_p1, lo_ma_p1_6, t2_p1, lo_ma_p1_6);
  308.       ObjectSet("lo_6_p1",OBJPROP_STYLE,STYLE_SOLID);
  309.       ObjectSet("lo_6_p1",OBJPROP_WIDTH,2);
  310.       ObjectSet("lo_6_p1",OBJPROP_RAY,false);
  311.       ObjectSet("lo_6_p1",OBJPROP_COLOR,fib_SR_shadow_7_c);
  312.       ObjectSetText("lo_6_p1",DoubleToStr(lo_ma_p1_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  313.       //----
  314.       ObjectCreate("hi_6_p1",OBJ_TREND,0,t1_p1, hi_ma_p1_6, t2_p1, hi_ma_p1_6);
  315.       ObjectSet("hi_6_p1",OBJPROP_STYLE,STYLE_SOLID);
  316.       ObjectSet("hi_6_p1",OBJPROP_WIDTH,2);
  317.       ObjectSet("hi_6_p1",OBJPROP_RAY,false);
  318.       ObjectSet("hi_6_p1",OBJPROP_COLOR,fib_SR_shadow_7_c);
  319.       ObjectSetText("hi_6_p1",DoubleToStr(hi_ma_p1_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  320.      }
  321.    //_______________Moving Average Support & Resistance Levels______________________________
  322.    string space="             ";
  323.    ObjectCreate("ma1_p1",OBJ_TEXT,0,t1_p1,ma1_p1);//13 ma
  324.    ObjectSetText("ma1_p1",space+DoubleToStr(ma1_p1,Digits),8,"Arial",White);
  325.    ObjectCreate("ma2_p1",OBJ_TEXT,0,t1_p1,ma2_p1);//21 ma
  326.    ObjectSetText("ma2_p1",space+DoubleToStr(ma2_p1,Digits),8,"Arial",White);
  327.    ObjectCreate("ma3_p1",OBJ_TEXT,0,t1_p1,ma3_p1);//34 ma
  328.    //----
  329.    if(Bid>ma3_p1) {ObjectSetText("ma3_p1",space+DoubleToStr(ma3_p1,Digits),8,"Arial",LightGreen);}
  330.    if(Ask<ma3_p1) {ObjectSetText("ma3_p1",space+DoubleToStr(ma3_p1,Digits),8,"Arial",Pink);}
  331.    if(Bid<=ma3_p1 && Ask>=ma3_p1)
  332.      {
  333.      ObjectSetText("ma3_p1",space+DoubleToStr(ma3_p1,Digits),8,"Arial",Yellow);}
  334.    ObjectCreate("ma4_p1",OBJ_TEXT,0,t1_p1,ma4_p1);//55 ma
  335.    if(Bid>ma4_p1) {ObjectSetText("ma4_p1",space+DoubleToStr(ma4_p1,Digits),8,"Arial",LightGreen);}
  336.    if(Ask<ma4_p1) {ObjectSetText("ma4_p1",space+DoubleToStr(ma4_p1,Digits),8,"Arial",Pink);}
  337.    if(Bid<=ma4_p1 && Ask>=ma4_p1)
  338.      {
  339.      ObjectSetText("ma4_p1",space+DoubleToStr(ma4_p1,Digits),8,"Arial",Yellow);}
  340.    ObjectCreate("ma5_p1",OBJ_TEXT,0,t1_p1,ma5_p1);//89 ma
  341.    if(Bid>ma5_p1) {ObjectSetText("ma5_p1",space+DoubleToStr(ma5_p1,Digits),8,"Arial",Green);}
  342.    if(Ask<ma5_p1) {ObjectSetText("ma5_p1",space+DoubleToStr(ma5_p1,Digits),8,"Arial",Red);}
  343.    if(Bid<=ma5_p1 && Ask>=ma5_p1)
  344.      {
  345.       ObjectSetText("ma5_p1",space+DoubleToStr(ma5_p1,Digits),8,"Arial",Yellow);
  346.      }
  347.    ObjectCreate("ma6_p1",OBJ_TEXT,0,t1_p1,NormalizeDouble(ma6_p1,Digits));//144 ma
  348.    if(Bid>ma6_p1) {ObjectSetText("ma6_p1",space+DoubleToStr(ma6_p1,Digits),8,"Arial",Green);}
  349.    if(Ask<ma6_p1) {ObjectSetText("ma6_p1",space+DoubleToStr(ma6_p1,Digits),8,"Arial",Red);}
  350.    if(Bid<=ma6_p1 && Ask>=ma6_p1)
  351.      {
  352.      ObjectSetText("ma6_p1",space+DoubleToStr(ma6_p1,Digits),8,"Arial",Yellow);}
  353.    ObjectCreate("ma7_p1",OBJ_TEXT,0,t1_p1,NormalizeDouble(ma7_p1,Digits));//233 ma
  354.    if(Bid>ma7_p1) {ObjectSetText("ma7_p1",space+DoubleToStr(ma7_p1,Digits),8,"Arial",Green);}
  355.    if(Ask<ma7_p1) {ObjectSetText("ma7_p1",space+DoubleToStr(ma7_p1,Digits),8,"Arial",Red);}
  356.    if(Bid<=ma7_p1 && Ask>=ma7_p1)
  357.      {
  358.      ObjectSetText("ma7_p1",space+DoubleToStr(ma7_p1,Digits),8,"Arial",Yellow);}
  359.   }
  360.   //end p1_Fib_Plot()
  361.   void p2_Fib_Plot()
  362.   {
  363.    //p2 dynamic fibo levels
  364.    double lo_ma_p2,hi_ma_p2;
  365.    lo_ma_p2=ma1_p2;
  366.    if(ma2_p2<lo_ma_p2)  {lo_ma_p2=ma2_p2;}
  367.    if(ma3_p2<lo_ma_p2)  {lo_ma_p2=ma3_p2;}
  368.    if(ma4_p2<lo_ma_p2)  {lo_ma_p2=ma4_p2;}
  369.    if(ma5_p2<lo_ma_p2)  {lo_ma_p2=ma5_p2;}
  370.    if(ma6_p2<lo_ma_p2)  {lo_ma_p2=ma6_p2;}
  371.    if(ma7_p2<lo_ma_p2)  {lo_ma_p2=ma7_p2;}
  372.    lo_ma_p2=NormalizeDouble(lo_ma_p2+(fib_SR_shadow_1*Point),Digits);
  373. //----
  374.    hi_ma_p2=ma7_p2;
  375.    if(ma6_p2>hi_ma_p2)  {hi_ma_p2=ma6_p2;}
  376.    if(ma5_p2>hi_ma_p2)  {hi_ma_p2=ma5_p2;}
  377.    if(ma4_p2>hi_ma_p2)  {hi_ma_p2=ma4_p2;}
  378.    if(ma3_p2>hi_ma_p2)  {hi_ma_p2=ma3_p2;}
  379.    if(ma2_p2>hi_ma_p2)  {hi_ma_p2=ma2_p2;}
  380.    if(ma1_p2>hi_ma_p2)  {hi_ma_p2=ma1_p2;}
  381.    hi_ma_p2=NormalizeDouble(hi_ma_p2-(fib_SR_shadow_1*Point),Digits);
  382.    //p2 center dynamic fib placement      
  383.    if(lo_ma_p2-hi_ma_p2>Ask-Bid)
  384.      {
  385.       ObjectCreate("lcf_p2",OBJ_TREND,0,t1_p2, lo_ma_p2, t2_p2, lo_ma_p2);
  386.       ObjectSet("lcf_p2",OBJPROP_STYLE,STYLE_SOLID);
  387.       ObjectSet("lcf_p2",OBJPROP_WIDTH,2);
  388.       ObjectSet("lcf_p2",OBJPROP_RAY,false);
  389.       ObjectSet("lcf_p2",OBJPROP_COLOR,fib_SR_shadow_1_c);
  390.       ObjectSetText("lcf_p2",DoubleToStr(lo_ma_p2,Digits),7,"Arial",fib_SR_shadow_1_c);
  391.       //----
  392.       ObjectCreate("hcf_p2",OBJ_TREND,0,t1_p2, hi_ma_p2, t2_p2, hi_ma_p2);
  393.       ObjectSet("hcf_p2",OBJPROP_STYLE,STYLE_SOLID);
  394.       ObjectSet("hcf_p2",OBJPROP_WIDTH,2);
  395.       ObjectSet("hcf_p2",OBJPROP_RAY,false);
  396.       ObjectSet("hcf_p2",OBJPROP_COLOR,fib_SR_shadow_1_c);
  397.       ObjectSetText("hcf_p2",DoubleToStr(hi_ma_p2,Digits),7,"Arial",fib_SR_shadow_1_c);
  398.      }
  399. //----
  400.    double lo_ma_p2_1, lo_ma_p2_2, lo_ma_p2_3, lo_ma_p2_4, lo_ma_p2_5, lo_ma_p2_6;
  401.    lo_ma_p2_1=lo_ma_p2+(fib_SR_shadow_2*Point);
  402.    lo_ma_p2_2=lo_ma_p2_1+(fib_SR_shadow_3*Point);
  403.    lo_ma_p2_3=lo_ma_p2_2+(fib_SR_shadow_4*Point);
  404.    lo_ma_p2_4=lo_ma_p2_3+(fib_SR_shadow_5*Point);
  405.    lo_ma_p2_5=lo_ma_p2_4+(fib_SR_shadow_6*Point);
  406.    lo_ma_p2_6=lo_ma_p2_5+(fib_SR_shadow_7*Point);
  407. //----
  408.    double hi_ma_p2_1, hi_ma_p2_2, hi_ma_p2_3, hi_ma_p2_4, hi_ma_p2_5, hi_ma_p2_6;
  409.    hi_ma_p2_1=hi_ma_p2-(fib_SR_shadow_2*Point);
  410.    hi_ma_p2_2=hi_ma_p2_1-(fib_SR_shadow_3*Point);
  411.    hi_ma_p2_3=hi_ma_p2_2-(fib_SR_shadow_4*Point);
  412.    hi_ma_p2_4=hi_ma_p2_3-(fib_SR_shadow_5*Point);
  413.    hi_ma_p2_5=hi_ma_p2_4-(fib_SR_shadow_6*Point);
  414.    hi_ma_p2_6=hi_ma_p2_5-(fib_SR_shadow_7*Point);
  415.    //p2 1st level (hi_1_p2, lo_1_p2)
  416.    if(lo_ma_p2_1-hi_ma_p2_1>Ask-Bid)
  417.      {
  418.       ObjectCreate("lo_1_p2",OBJ_TREND,0,t1_p2, lo_ma_p2_1, t2_p2, lo_ma_p2_1);
  419.       ObjectSet("lo_1_p2",OBJPROP_STYLE,STYLE_SOLID);
  420.       ObjectSet("lo_1_p2",OBJPROP_WIDTH,2);
  421.       ObjectSet("lo_1_p2",OBJPROP_RAY,false);
  422.       ObjectSet("lo_1_p2",OBJPROP_COLOR,fib_SR_shadow_2_c);
  423.       ObjectSetText("lo_1_p2",DoubleToStr(lo_ma_p2_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  424.       //----
  425.       ObjectCreate("hi_1_p2",OBJ_TREND,0,t1_p2, hi_ma_p2_1, t2_p2, hi_ma_p2_1);
  426.       ObjectSet("hi_1_p2",OBJPROP_STYLE,STYLE_SOLID);
  427.       ObjectSet("hi_1_p2",OBJPROP_WIDTH,2);
  428.       ObjectSet("hi_1_p2",OBJPROP_RAY,false);
  429.       ObjectSet("hi_1_p2",OBJPROP_COLOR,fib_SR_shadow_2_c);
  430.       ObjectSetText("hi_1_p2",DoubleToStr(hi_ma_p2_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  431.      }
  432.    // 2st level (hi_2_p2, lo_2_p2)
  433.    if(lo_ma_p2_2-hi_ma_p2_2>Ask-Bid)
  434.      {
  435.       ObjectCreate("lo_2_p2",OBJ_TREND,0,t1_p2, lo_ma_p2_2, t2_p2, lo_ma_p2_2);
  436.       ObjectSet("lo_2_p2",OBJPROP_STYLE,STYLE_SOLID);
  437.       ObjectSet("lo_2_p2",OBJPROP_WIDTH,2);
  438.       ObjectSet("lo_2_p2",OBJPROP_RAY,false);
  439.       ObjectSet("lo_2_p2",OBJPROP_COLOR,fib_SR_shadow_3_c);
  440.       ObjectSetText("lo_2_p2",DoubleToStr(lo_ma_p2_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  441.       //----
  442.       ObjectCreate("hi_2_p2",OBJ_TREND,0,t1_p2, hi_ma_p2_2, t2_p2, hi_ma_p2_2);
  443.       ObjectSet("hi_2_p2",OBJPROP_STYLE,STYLE_SOLID);
  444.       ObjectSet("hi_2_p2",OBJPROP_WIDTH,2);
  445.       ObjectSet("hi_2_p2",OBJPROP_RAY,false);
  446.       ObjectSet("hi_2_p2",OBJPROP_COLOR,fib_SR_shadow_3_c);
  447.       ObjectSetText("hi_2_p2",DoubleToStr(hi_ma_p2_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  448.      }
  449.    // 3rd level (hi_3_p2, lo_3_p2)
  450.    if(lo_ma_p2_3-hi_ma_p2_3>Ask-Bid)
  451.      {
  452.       ObjectCreate("lo_3_p2",OBJ_TREND,0,t1_p2, lo_ma_p2_3, t2_p2, lo_ma_p2_3);
  453.       ObjectSet("lo_3_p2",OBJPROP_STYLE,STYLE_SOLID);
  454.       ObjectSet("lo_3_p2",OBJPROP_WIDTH,2);
  455.       ObjectSet("lo_3_p2",OBJPROP_RAY,false);
  456.       ObjectSet("lo_3_p2",OBJPROP_COLOR,fib_SR_shadow_4_c);
  457.       ObjectSetText("lo_3_p2",DoubleToStr(lo_ma_p2_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  458.       //----
  459.       ObjectCreate("hi_3_p2",OBJ_TREND,0,t1_p2, hi_ma_p2_3, t2_p2, hi_ma_p2_3);
  460.       ObjectSet("hi_3_p2",OBJPROP_STYLE,STYLE_SOLID);
  461.       ObjectSet("hi_3_p2",OBJPROP_WIDTH,2);
  462.       ObjectSet("hi_3_p2",OBJPROP_RAY,false);
  463.       ObjectSet("hi_3_p2",OBJPROP_COLOR,fib_SR_shadow_4_c);
  464.       ObjectSetText("hi_3_p2",DoubleToStr(hi_ma_p2_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  465.      }
  466.    // 4th level (hi_4_p2, lo_4_p2)
  467.    if(lo_ma_p2_4-hi_ma_p2_4>Ask-Bid)
  468.      {
  469.       ObjectCreate("lo_4_p2",OBJ_TREND,0,t1_p2, lo_ma_p2_4, t2_p2, lo_ma_p2_4);
  470.       ObjectSet("lo_4_p2",OBJPROP_STYLE,STYLE_SOLID);
  471.       ObjectSet("lo_4_p2",OBJPROP_WIDTH,2);
  472.       ObjectSet("lo_4_p2",OBJPROP_RAY,false);
  473.       ObjectSet("lo_4_p2",OBJPROP_COLOR,fib_SR_shadow_5_c);
  474.       ObjectSetText("lo_4_p2",DoubleToStr(lo_ma_p2_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  475.       //----
  476.       ObjectCreate("hi_4_p2",OBJ_TREND,0,t1_p2, hi_ma_p2_4, t2_p2, hi_ma_p2_4);
  477.       ObjectSet("hi_4_p2",OBJPROP_STYLE,STYLE_SOLID);
  478.       ObjectSet("hi_4_p2",OBJPROP_WIDTH,2);
  479.       ObjectSet("hi_4_p2",OBJPROP_RAY,false);
  480.       ObjectSet("hi_4_p2",OBJPROP_COLOR,fib_SR_shadow_5_c);
  481.       ObjectSetText("hi_4_p2",DoubleToStr(hi_ma_p2_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  482.      }
  483.    // 5th level (hi_5_p2, lo_5_p2)
  484.    if(lo_ma_p2_5-hi_ma_p2_5>Ask-Bid)
  485.      {
  486.       ObjectCreate("lo_5_p2",OBJ_TREND,0,t1_p2, lo_ma_p2_5, t2_p2, lo_ma_p2_5);
  487.       ObjectSet("lo_5_p2",OBJPROP_STYLE,STYLE_SOLID);
  488.       ObjectSet("lo_5_p2",OBJPROP_WIDTH,2);
  489.       ObjectSet("lo_5_p2",OBJPROP_RAY,false);
  490.       ObjectSet("lo_5_p2",OBJPROP_COLOR,fib_SR_shadow_6_c);
  491.       ObjectSetText("lo_5_p2",DoubleToStr(lo_ma_p2_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  492.       //----
  493.       ObjectCreate("hi_5_p2",OBJ_TREND,0,t1_p2, hi_ma_p2_5, t2_p2, hi_ma_p2_5);
  494.       ObjectSet("hi_5_p2",OBJPROP_STYLE,STYLE_SOLID);
  495.       ObjectSet("hi_5_p2",OBJPROP_WIDTH,2);
  496.       ObjectSet("hi_5_p2",OBJPROP_RAY,false);
  497.       ObjectSet("hi_5_p2",OBJPROP_COLOR,fib_SR_shadow_6_c);
  498.       ObjectSetText("hi_5_p2",DoubleToStr(hi_ma_p2_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  499.      }
  500.    // 6th level (hi_6_p2, lo_6_p2)
  501.    if(lo_ma_p2_6-hi_ma_p2_6>Ask-Bid)
  502.      {
  503.       ObjectCreate("lo_6_p2",OBJ_TREND,0,t1_p2, lo_ma_p2_6, t2_p2, lo_ma_p2_6);
  504.       ObjectSet("lo_6_p2",OBJPROP_STYLE,STYLE_SOLID);
  505.       ObjectSet("lo_6_p2",OBJPROP_WIDTH,2);
  506.       ObjectSet("lo_6_p2",OBJPROP_RAY,false);
  507.       ObjectSet("lo_6_p2",OBJPROP_COLOR,fib_SR_shadow_7_c);
  508.       ObjectSetText("lo_6_p2",DoubleToStr(lo_ma_p2_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  509.       //----
  510.       ObjectCreate("hi_6_p2",OBJ_TREND,0,t1_p2, hi_ma_p2_6, t2_p2, hi_ma_p2_6);
  511.       ObjectSet("hi_6_p2",OBJPROP_STYLE,STYLE_SOLID);
  512.       ObjectSet("hi_6_p2",OBJPROP_WIDTH,2);
  513.       ObjectSet("hi_6_p2",OBJPROP_RAY,false);
  514.       ObjectSet("hi_6_p2",OBJPROP_COLOR,fib_SR_shadow_7_c);
  515.       ObjectSetText("hi_6_p2",DoubleToStr(hi_ma_p2_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  516.      }
  517.    //_______________Moving Average Support & Resistance Levels______________________________
  518.    string space="             ";
  519.    ObjectCreate("ma1_p2",OBJ_TEXT,0,t1_p2,ma1_p2);//13 ma
  520.    ObjectSetText("ma1_p2",space+DoubleToStr(ma1_p2,Digits),8,"Arial",White);
  521.    ObjectCreate("ma2_p2",OBJ_TEXT,0,t1_p2,ma2_p2);//21 ma
  522.    ObjectSetText("ma2_p2",space+DoubleToStr(ma2_p2,Digits),8,"Arial",White);
  523.    ObjectCreate("ma3_p2",OBJ_TEXT,0,t1_p2,ma3_p2);//34 ma
  524. //----
  525.    if(Bid>ma3_p2) {ObjectSetText("ma3_p2",space+DoubleToStr(ma3_p2,Digits),8,"Arial",LightGreen);}
  526.    if(Ask<ma3_p2) {ObjectSetText("ma3_p2",space+DoubleToStr(ma3_p2,Digits),8,"Arial",Pink);}
  527.    if(Bid<=ma3_p2 && Ask>=ma3_p2)
  528.      {
  529.       ObjectSetText("ma3_p2",space+DoubleToStr(ma3_p2,Digits),8,"Arial",Yellow);
  530.      }
  531.    ObjectCreate("ma4_p2",OBJ_TEXT,0,t1_p2,ma4_p2);//55 ma
  532.    if(Bid>ma4_p2) {ObjectSetText("ma4_p2",space+DoubleToStr(ma4_p2,Digits),8,"Arial",LightGreen);}
  533.    if(Ask<ma4_p2) {ObjectSetText("ma4_p2",space+DoubleToStr(ma4_p2,Digits),8,"Arial",Pink);}
  534.    if(Bid<=ma4_p2 && Ask>=ma4_p2)
  535.      {
  536.       ObjectSetText("ma4_p2",space+DoubleToStr(ma4_p2,Digits),8,"Arial",Yellow);
  537.      }
  538.    ObjectCreate("ma5_p2",OBJ_TEXT,0,t1_p2,ma5_p2);//89 ma
  539.    if(Bid>ma5_p2) {ObjectSetText("ma5_p2",space+DoubleToStr(ma5_p2,Digits),8,"Arial",Green);}
  540.    if(Ask<ma5_p2) {ObjectSetText("ma5_p2",space+DoubleToStr(ma5_p2,Digits),8,"Arial",Red);}
  541.    if(Bid<=ma5_p2 && Ask>=ma5_p2)
  542.      {
  543.       ObjectSetText("ma5_p2",space+DoubleToStr(ma5_p2,Digits),8,"Arial",Yellow);
  544.      }
  545.    ObjectCreate("ma6_p2",OBJ_TEXT,0,t1_p2,NormalizeDouble(ma6_p2,Digits));//144 ma
  546.    if(Bid>ma6_p2) {ObjectSetText("ma6_p2",space+DoubleToStr(ma6_p2,Digits),8,"Arial",Green);}
  547.    if(Ask<ma6_p2) {ObjectSetText("ma6_p2",space+DoubleToStr(ma6_p2,Digits),8,"Arial",Red);}
  548.    if(Bid<=ma6_p2 && Ask>=ma6_p2)
  549.      {
  550.       ObjectSetText("ma6_p2",space+DoubleToStr(ma6_p2,Digits),8,"Arial",Yellow);
  551.      }
  552.    ObjectCreate("ma7_p2",OBJ_TEXT,0,t1_p2,NormalizeDouble(ma7_p2,Digits));//233 ma
  553.    if(Bid>ma7_p2) {ObjectSetText("ma7_p2",space+DoubleToStr(ma7_p2,Digits),8,"Arial",Green);}
  554.    if(Ask<ma7_p2) {ObjectSetText("ma7_p2",space+DoubleToStr(ma7_p2,Digits),8,"Arial",Red);}
  555.    if(Bid<=ma7_p2 && Ask>=ma7_p2)
  556.      {
  557.       ObjectSetText("ma7_p2",space+DoubleToStr(ma7_p2,Digits),8,"Arial",Yellow);
  558.      }
  559.   }
  560.   //end p2_Fib_Plot()
  561.   void p3_Fib_Plot()
  562.   {
  563.    //p3 dynamic fibo levels
  564.    double lo_ma_p3,hi_ma_p3;
  565.    lo_ma_p3=ma1_p3;
  566.    if(ma2_p3<lo_ma_p3)  {lo_ma_p3=ma2_p3;}
  567.    if(ma3_p3<lo_ma_p3)  {lo_ma_p3=ma3_p3;}
  568.    if(ma4_p3<lo_ma_p3)  {lo_ma_p3=ma4_p3;}
  569.    if(ma5_p3<lo_ma_p3)  {lo_ma_p3=ma5_p3;}
  570.    if(ma6_p3<lo_ma_p3)  {lo_ma_p3=ma6_p3;}
  571.    if(ma7_p3<lo_ma_p3)  {lo_ma_p3=ma7_p3;}
  572.    lo_ma_p3=NormalizeDouble(lo_ma_p3+(fib_SR_shadow_1*Point),Digits);
  573.    hi_ma_p3=ma7_p3;
  574.    if(ma6_p3>hi_ma_p3)  {hi_ma_p3=ma6_p3;}
  575.    if(ma5_p3>hi_ma_p3)  {hi_ma_p3=ma5_p3;}
  576.    if(ma4_p3>hi_ma_p3)  {hi_ma_p3=ma4_p3;}
  577.    if(ma3_p3>hi_ma_p3)  {hi_ma_p3=ma3_p3;}
  578.    if(ma2_p3>hi_ma_p3)  {hi_ma_p3=ma2_p3;}
  579.    if(ma1_p3>hi_ma_p3)  {hi_ma_p3=ma1_p3;}
  580.    hi_ma_p3=NormalizeDouble(hi_ma_p3-(fib_SR_shadow_1*Point),Digits);
  581.    //p3 center dynamic fib placement      
  582.    if(lo_ma_p3-hi_ma_p3>Ask-Bid)
  583.      {
  584.       ObjectCreate("lcf_p3",OBJ_TREND,0,t1_p3, lo_ma_p3, t2_p3, lo_ma_p3);
  585.       ObjectSet("lcf_p3",OBJPROP_STYLE,STYLE_SOLID);
  586.       ObjectSet("lcf_p3",OBJPROP_WIDTH,2);
  587.       ObjectSet("lcf_p3",OBJPROP_RAY,false);
  588.       ObjectSet("lcf_p3",OBJPROP_COLOR,fib_SR_shadow_1_c);
  589.       ObjectSetText("lcf_p3",DoubleToStr(lo_ma_p3,Digits),7,"Arial",fib_SR_shadow_1_c);
  590.       //----
  591.       ObjectCreate("hcf_p3",OBJ_TREND,0,t1_p3, hi_ma_p3, t2_p3, hi_ma_p3);
  592.       ObjectSet("hcf_p3",OBJPROP_STYLE,STYLE_SOLID);
  593.       ObjectSet("hcf_p3",OBJPROP_WIDTH,2);
  594.       ObjectSet("hcf_p3",OBJPROP_RAY,false);
  595.       ObjectSet("hcf_p3",OBJPROP_COLOR,fib_SR_shadow_1_c);
  596.       ObjectSetText("hcf_p3",DoubleToStr(hi_ma_p3,Digits),7,"Arial",fib_SR_shadow_1_c);
  597.      }
  598. //----
  599.    double lo_ma_p3_1, lo_ma_p3_2, lo_ma_p3_3, lo_ma_p3_4, lo_ma_p3_5, lo_ma_p3_6;
  600.    lo_ma_p3_1=lo_ma_p3+(fib_SR_shadow_2*Point);
  601.    lo_ma_p3_2=lo_ma_p3_1+(fib_SR_shadow_3*Point);
  602.    lo_ma_p3_3=lo_ma_p3_2+(fib_SR_shadow_4*Point);
  603.    lo_ma_p3_4=lo_ma_p3_3+(fib_SR_shadow_5*Point);
  604.    lo_ma_p3_5=lo_ma_p3_4+(fib_SR_shadow_6*Point);
  605.    lo_ma_p3_6=lo_ma_p3_5+(fib_SR_shadow_7*Point);
  606. //----
  607.    double hi_ma_p3_1, hi_ma_p3_2, hi_ma_p3_3, hi_ma_p3_4, hi_ma_p3_5, hi_ma_p3_6;
  608.    hi_ma_p3_1=hi_ma_p3-(fib_SR_shadow_2*Point);
  609.    hi_ma_p3_2=hi_ma_p3_1-(fib_SR_shadow_3*Point);
  610.    hi_ma_p3_3=hi_ma_p3_2-(fib_SR_shadow_4*Point);
  611.    hi_ma_p3_4=hi_ma_p3_3-(fib_SR_shadow_5*Point);
  612.    hi_ma_p3_5=hi_ma_p3_4-(fib_SR_shadow_6*Point);
  613.    hi_ma_p3_6=hi_ma_p3_5-(fib_SR_shadow_7*Point);
  614.    //p3 1st level (hi_1_p3, lo_1_p3)
  615.    if(lo_ma_p3_1-hi_ma_p3_1>Ask-Bid)
  616.      {
  617.       ObjectCreate("lo_1_p3",OBJ_TREND,0,t1_p3, lo_ma_p3_1, t2_p3, lo_ma_p3_1);
  618.       ObjectSet("lo_1_p3",OBJPROP_STYLE,STYLE_SOLID);
  619.       ObjectSet("lo_1_p3",OBJPROP_WIDTH,2);
  620.       ObjectSet("lo_1_p3",OBJPROP_RAY,false);
  621.       ObjectSet("lo_1_p3",OBJPROP_COLOR,fib_SR_shadow_2_c);
  622.       ObjectSetText("lo_1_p3",DoubleToStr(lo_ma_p3_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  623.       //----
  624.       ObjectCreate("hi_1_p3",OBJ_TREND,0,t1_p3, hi_ma_p3_1, t2_p3, hi_ma_p3_1);
  625.       ObjectSet("hi_1_p3",OBJPROP_STYLE,STYLE_SOLID);
  626.       ObjectSet("hi_1_p3",OBJPROP_WIDTH,2);
  627.       ObjectSet("hi_1_p3",OBJPROP_RAY,false);
  628.       ObjectSet("hi_1_p3",OBJPROP_COLOR,fib_SR_shadow_2_c);
  629.       ObjectSetText("hi_1_p3",DoubleToStr(hi_ma_p3_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  630.      }
  631.    // 2st level (hi_2_p3, lo_2_p3)
  632.    if(lo_ma_p3_2-hi_ma_p3_2>Ask-Bid)
  633.      {
  634.       ObjectCreate("lo_2_p3",OBJ_TREND,0,t1_p3, lo_ma_p3_2, t2_p3, lo_ma_p3_2);
  635.       ObjectSet("lo_2_p3",OBJPROP_STYLE,STYLE_SOLID);
  636.       ObjectSet("lo_2_p3",OBJPROP_WIDTH,2);
  637.       ObjectSet("lo_2_p3",OBJPROP_RAY,false);
  638.       ObjectSet("lo_2_p3",OBJPROP_COLOR,fib_SR_shadow_3_c);
  639.       ObjectSetText("lo_2_p3",DoubleToStr(lo_ma_p3_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  640.       //----
  641.       ObjectCreate("hi_2_p3",OBJ_TREND,0,t1_p3, hi_ma_p3_2, t2_p3, hi_ma_p3_2);
  642.       ObjectSet("hi_2_p3",OBJPROP_STYLE,STYLE_SOLID);
  643.       ObjectSet("hi_2_p3",OBJPROP_WIDTH,2);
  644.       ObjectSet("hi_2_p3",OBJPROP_RAY,false);
  645.       ObjectSet("hi_2_p3",OBJPROP_COLOR,fib_SR_shadow_3_c);
  646.       ObjectSetText("hi_2_p3",DoubleToStr(hi_ma_p3_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  647.      }
  648.    // 3rd level (hi_3_p3, lo_3_p3)
  649.    if(lo_ma_p3_3-hi_ma_p3_3>Ask-Bid)
  650.      {
  651.       ObjectCreate("lo_3_p3",OBJ_TREND,0,t1_p3, lo_ma_p3_3, t2_p3, lo_ma_p3_3);
  652.       ObjectSet("lo_3_p3",OBJPROP_STYLE,STYLE_SOLID);
  653.       ObjectSet("lo_3_p3",OBJPROP_WIDTH,2);
  654.       ObjectSet("lo_3_p3",OBJPROP_RAY,false);
  655.       ObjectSet("lo_3_p3",OBJPROP_COLOR,fib_SR_shadow_4_c);
  656.       ObjectSetText("lo_3_p3",DoubleToStr(lo_ma_p3_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  657.       //----
  658.       ObjectCreate("hi_3_p3",OBJ_TREND,0,t1_p3, hi_ma_p3_3, t2_p3, hi_ma_p3_3);
  659.       ObjectSet("hi_3_p3",OBJPROP_STYLE,STYLE_SOLID);
  660.       ObjectSet("hi_3_p3",OBJPROP_WIDTH,2);
  661.       ObjectSet("hi_3_p3",OBJPROP_RAY,false);
  662.       ObjectSet("hi_3_p3",OBJPROP_COLOR,fib_SR_shadow_4_c);
  663.       ObjectSetText("hi_3_p3",DoubleToStr(hi_ma_p3_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  664.      }
  665.    // 4th level (hi_4_p3, lo_4_p3)
  666.    if(lo_ma_p3_4-hi_ma_p3_4>Ask-Bid)
  667.      {
  668.       ObjectCreate("lo_4_p3",OBJ_TREND,0,t1_p3, lo_ma_p3_4, t2_p3, lo_ma_p3_4);
  669.       ObjectSet("lo_4_p3",OBJPROP_STYLE,STYLE_SOLID);
  670.       ObjectSet("lo_4_p3",OBJPROP_WIDTH,2);
  671.       ObjectSet("lo_4_p3",OBJPROP_RAY,false);
  672.       ObjectSet("lo_4_p3",OBJPROP_COLOR,fib_SR_shadow_5_c);
  673.       ObjectSetText("lo_4_p3",DoubleToStr(lo_ma_p3_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  674.       //----
  675.       ObjectCreate("hi_4_p3",OBJ_TREND,0,t1_p3, hi_ma_p3_4, t2_p3, hi_ma_p3_4);
  676.       ObjectSet("hi_4_p3",OBJPROP_STYLE,STYLE_SOLID);
  677.       ObjectSet("hi_4_p3",OBJPROP_WIDTH,2);
  678.       ObjectSet("hi_4_p3",OBJPROP_RAY,false);
  679.       ObjectSet("hi_4_p3",OBJPROP_COLOR,fib_SR_shadow_5_c);
  680.       ObjectSetText("hi_4_p3",DoubleToStr(hi_ma_p3_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  681.      }
  682.    // 5th level (hi_5_p3, lo_5_p3)
  683.    if(lo_ma_p3_5-hi_ma_p3_5>Ask-Bid)
  684.      {
  685.       ObjectCreate("lo_5_p3",OBJ_TREND,0,t1_p3, lo_ma_p3_5, t2_p3, lo_ma_p3_5);
  686.       ObjectSet("lo_5_p3",OBJPROP_STYLE,STYLE_SOLID);
  687.       ObjectSet("lo_5_p3",OBJPROP_WIDTH,2);
  688.       ObjectSet("lo_5_p3",OBJPROP_RAY,false);
  689.       ObjectSet("lo_5_p3",OBJPROP_COLOR,fib_SR_shadow_6_c);
  690.       ObjectSetText("lo_5_p3",DoubleToStr(lo_ma_p3_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  691.       //----
  692.       ObjectCreate("hi_5_p3",OBJ_TREND,0,t1_p3, hi_ma_p3_5, t2_p3, hi_ma_p3_5);
  693.       ObjectSet("hi_5_p3",OBJPROP_STYLE,STYLE_SOLID);
  694.       ObjectSet("hi_5_p3",OBJPROP_WIDTH,2);
  695.       ObjectSet("hi_5_p3",OBJPROP_RAY,false);
  696.       ObjectSet("hi_5_p3",OBJPROP_COLOR,fib_SR_shadow_6_c);
  697.       ObjectSetText("hi_5_p3",DoubleToStr(hi_ma_p3_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  698.      }
  699.    // 6th level (hi_6_p3, lo_6_p3)
  700.    if(lo_ma_p3_6-hi_ma_p3_6>Ask-Bid)
  701.      {
  702.       ObjectCreate("lo_6_p3",OBJ_TREND,0,t1_p3, lo_ma_p3_6, t2_p3, lo_ma_p3_6);
  703.       ObjectSet("lo_6_p3",OBJPROP_STYLE,STYLE_SOLID);
  704.       ObjectSet("lo_6_p3",OBJPROP_WIDTH,2);
  705.       ObjectSet("lo_6_p3",OBJPROP_RAY,false);
  706.       ObjectSet("lo_6_p3",OBJPROP_COLOR,fib_SR_shadow_7_c);
  707.       ObjectSetText("lo_6_p3",DoubleToStr(lo_ma_p3_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  708.       //----
  709.       ObjectCreate("hi_6_p3",OBJ_TREND,0,t1_p3, hi_ma_p3_6, t2_p3, hi_ma_p3_6);
  710.       ObjectSet("hi_6_p3",OBJPROP_STYLE,STYLE_SOLID);
  711.       ObjectSet("hi_6_p3",OBJPROP_WIDTH,2);
  712.       ObjectSet("hi_6_p3",OBJPROP_RAY,false);
  713.       ObjectSet("hi_6_p3",OBJPROP_COLOR,fib_SR_shadow_7_c);
  714.       ObjectSetText("hi_6_p3",DoubleToStr(hi_ma_p3_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  715.      }
  716.    //_______________Moving Average Support & Resistance Levels______________________________
  717.    string space="             ";
  718.    ObjectCreate("ma1_p3",OBJ_TEXT,0,t1_p3,ma1_p3);//13 ma
  719.    ObjectSetText("ma1_p3",space+DoubleToStr(ma1_p3,Digits),8,"Arial",White);
  720.    ObjectCreate("ma2_p3",OBJ_TEXT,0,t1_p3,ma2_p3);//21 ma
  721.    ObjectSetText("ma2_p3",space+DoubleToStr(ma2_p3,Digits),8,"Arial",White);
  722.    ObjectCreate("ma3_p3",OBJ_TEXT,0,t1_p3,ma3_p3);//34 ma
  723.      if(Bid>ma3_p3) {ObjectSetText("ma3_p3",space+DoubleToStr(ma3_p3,Digits),8,"Arial",LightGreen);
  724.      }
  725.      if(Ask<ma3_p3) {ObjectSetText("ma3_p3",space+DoubleToStr(ma3_p3,Digits),8,"Arial",Pink);
  726.      }
  727.    if(Bid<=ma3_p3 && Ask>=ma3_p3)
  728.      {
  729.       ObjectSetText("ma3_p3",space+DoubleToStr(ma3_p3,Digits),8,"Arial",Yellow);
  730.      }
  731.    ObjectCreate("ma4_p3",OBJ_TEXT,0,t1_p3,ma4_p3);//55 ma
  732.      if(Bid>ma4_p3) {ObjectSetText("ma4_p3",space+DoubleToStr(ma4_p3,Digits),8,"Arial",LightGreen);
  733.      }
  734.      if(Ask<ma4_p3) {ObjectSetText("ma4_p3",space+DoubleToStr(ma4_p3,Digits),8,"Arial",Pink);
  735.      }
  736.    if(Bid<=ma4_p3 && Ask>=ma4_p3)
  737.      {
  738.       ObjectSetText("ma4_p3",space+DoubleToStr(ma4_p3,Digits),8,"Arial",Yellow);
  739.      }
  740. //----
  741.    ObjectCreate("ma5_p3",OBJ_TEXT,0,t1_p3,ma5_p3);//89 ma
  742.      if(Bid>ma5_p3) {ObjectSetText("ma5_p3",space+DoubleToStr(ma5_p3,Digits),8,"Arial",Green);
  743.      }
  744.      if(Ask<ma5_p3) {ObjectSetText("ma5_p3",space+DoubleToStr(ma5_p3,Digits),8,"Arial",Red);
  745.      }
  746.    if(Bid<=ma5_p3 && Ask>=ma5_p3)
  747.      {
  748.       ObjectSetText("ma5_p3",space+DoubleToStr(ma5_p3,Digits),8,"Arial",Yellow);
  749.      }
  750. //----
  751.    ObjectCreate("ma6_p3",OBJ_TEXT,0,t1_p3,NormalizeDouble(ma6_p3,Digits));//144 ma
  752.      if(Bid>ma6_p3) {ObjectSetText("ma6_p3",space+DoubleToStr(ma6_p3,Digits),8,"Arial",Green);
  753.      }
  754.      if(Ask<ma6_p3) {ObjectSetText("ma6_p3",space+DoubleToStr(ma6_p3,Digits),8,"Arial",Red);
  755.      }
  756.    if(Bid<=ma6_p3 && Ask>=ma6_p3)
  757.      {
  758.       ObjectSetText("ma6_p3",space+DoubleToStr(ma6_p3,Digits),8,"Arial",Yellow);
  759.      }
  760. //----   
  761.    ObjectCreate("ma7_p3",OBJ_TEXT,0,t1_p3,NormalizeDouble(ma7_p3,Digits));//233 ma
  762.      if(Bid>ma7_p3) {ObjectSetText("ma7_p3",space+DoubleToStr(ma7_p3,Digits),8,"Arial",Green);
  763.      }
  764.      if(Ask<ma7_p3) {ObjectSetText("ma7_p3",space+DoubleToStr(ma7_p3,Digits),8,"Arial",Red);
  765.      }
  766.    if(Bid<=ma7_p3 && Ask>=ma7_p3)
  767.      {
  768.       ObjectSetText("ma7_p3",space+DoubleToStr(ma7_p3,Digits),8,"Arial",Yellow);
  769.      }
  770.   }
  771.   //end p3_Fib_Plot()
  772.   void p4_Fib_Plot()
  773.   {
  774.    //p4 dynamic fibo levels
  775.    double lo_ma_p4,hi_ma_p4;
  776.    lo_ma_p4=ma1_p4;
  777.    if(ma2_p4<lo_ma_p4)  {lo_ma_p4=ma2_p4;}
  778.    if(ma3_p4<lo_ma_p4)  {lo_ma_p4=ma3_p4;}
  779.    if(ma4_p4<lo_ma_p4)  {lo_ma_p4=ma4_p4;}
  780.    if(ma5_p4<lo_ma_p4)  {lo_ma_p4=ma5_p4;}
  781.    if(ma6_p4<lo_ma_p4)  {lo_ma_p4=ma6_p4;}
  782.    if(ma7_p4<lo_ma_p4)  {lo_ma_p4=ma7_p4;}
  783.    lo_ma_p4=NormalizeDouble(lo_ma_p4+(fib_SR_shadow_1*Point),Digits);
  784. //----
  785.    hi_ma_p4=ma7_p4;
  786.    if(ma6_p4>hi_ma_p4)  {hi_ma_p4=ma6_p4;}
  787.    if(ma5_p4>hi_ma_p4)  {hi_ma_p4=ma5_p4;}
  788.    if(ma4_p4>hi_ma_p4)  {hi_ma_p4=ma4_p4;}
  789.    if(ma3_p4>hi_ma_p4)  {hi_ma_p4=ma3_p4;}
  790.    if(ma2_p4>hi_ma_p4)  {hi_ma_p4=ma2_p4;}
  791.    if(ma1_p4>hi_ma_p4)  {hi_ma_p4=ma1_p4;}
  792.    hi_ma_p4=NormalizeDouble(hi_ma_p4-(fib_SR_shadow_1*Point),Digits);
  793.    //p4 center dynamic fib placement      
  794.    if(lo_ma_p4-hi_ma_p4>Ask-Bid)
  795.      {
  796.       ObjectCreate("lcf_p4",OBJ_TREND,0,t1_p4, lo_ma_p4, t2_p4, lo_ma_p4);
  797.       ObjectSet("lcf_p4",OBJPROP_STYLE,STYLE_SOLID);
  798.       ObjectSet("lcf_p4",OBJPROP_WIDTH,2);
  799.       ObjectSet("lcf_p4",OBJPROP_RAY,false);
  800.       ObjectSet("lcf_p4",OBJPROP_COLOR,fib_SR_shadow_1_c);
  801.       ObjectSetText("lcf_p4",DoubleToStr(lo_ma_p4,Digits),7,"Arial",fib_SR_shadow_1_c);
  802.       //----
  803.       ObjectCreate("hcf_p4",OBJ_TREND,0,t1_p4, hi_ma_p4, t2_p4, hi_ma_p4);
  804.       ObjectSet("hcf_p4",OBJPROP_STYLE,STYLE_SOLID);
  805.       ObjectSet("hcf_p4",OBJPROP_WIDTH,2);
  806.       ObjectSet("hcf_p4",OBJPROP_RAY,false);
  807.       ObjectSet("hcf_p4",OBJPROP_COLOR,fib_SR_shadow_1_c);
  808.       ObjectSetText("hcf_p4",DoubleToStr(hi_ma_p4,Digits),7,"Arial",fib_SR_shadow_1_c);
  809.      }
  810. //----   
  811.    double lo_ma_p4_1, lo_ma_p4_2, lo_ma_p4_3, lo_ma_p4_4, lo_ma_p4_5, lo_ma_p4_6;
  812.    lo_ma_p4_1=lo_ma_p4+(fib_SR_shadow_2*Point);
  813.    lo_ma_p4_2=lo_ma_p4_1+(fib_SR_shadow_3*Point);
  814.    lo_ma_p4_3=lo_ma_p4_2+(fib_SR_shadow_4*Point);
  815.    lo_ma_p4_4=lo_ma_p4_3+(fib_SR_shadow_5*Point);
  816.    lo_ma_p4_5=lo_ma_p4_4+(fib_SR_shadow_6*Point);
  817.    lo_ma_p4_6=lo_ma_p4_5+(fib_SR_shadow_7*Point);
  818. //-----
  819.    double hi_ma_p4_1, hi_ma_p4_2, hi_ma_p4_3, hi_ma_p4_4, hi_ma_p4_5, hi_ma_p4_6;
  820.    hi_ma_p4_1=hi_ma_p4-(fib_SR_shadow_2*Point);
  821.    hi_ma_p4_2=hi_ma_p4_1-(fib_SR_shadow_3*Point);
  822.    hi_ma_p4_3=hi_ma_p4_2-(fib_SR_shadow_4*Point);
  823.    hi_ma_p4_4=hi_ma_p4_3-(fib_SR_shadow_5*Point);
  824.    hi_ma_p4_5=hi_ma_p4_4-(fib_SR_shadow_6*Point);
  825.    hi_ma_p4_6=hi_ma_p4_5-(fib_SR_shadow_7*Point);
  826.    //p4 1st level (hi_1_p4, lo_1_p4)
  827.    if(lo_ma_p4_1-hi_ma_p4_1>Ask-Bid)
  828.      {
  829.       ObjectCreate("lo_1_p4",OBJ_TREND,0,t1_p4, lo_ma_p4_1, t2_p4, lo_ma_p4_1);
  830.       ObjectSet("lo_1_p4",OBJPROP_STYLE,STYLE_SOLID);
  831.       ObjectSet("lo_1_p4",OBJPROP_WIDTH,2);
  832.       ObjectSet("lo_1_p4",OBJPROP_RAY,false);
  833.       ObjectSet("lo_1_p4",OBJPROP_COLOR,fib_SR_shadow_2_c);
  834.       ObjectSetText("lo_1_p4",DoubleToStr(lo_ma_p4_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  835.       //----
  836.       ObjectCreate("hi_1_p4",OBJ_TREND,0,t1_p4, hi_ma_p4_1, t2_p4, hi_ma_p4_1);
  837.       ObjectSet("hi_1_p4",OBJPROP_STYLE,STYLE_SOLID);
  838.       ObjectSet("hi_1_p4",OBJPROP_WIDTH,2);
  839.       ObjectSet("hi_1_p4",OBJPROP_RAY,false);
  840.       ObjectSet("hi_1_p4",OBJPROP_COLOR,fib_SR_shadow_2_c);
  841.       ObjectSetText("hi_1_p4",DoubleToStr(hi_ma_p4_1,Digits),7,"Arial",fib_SR_shadow_2_c);
  842.      }
  843.    // 2st level (hi_2_p4, lo_2_p4)
  844.    if(lo_ma_p4_2-hi_ma_p4_2>Ask-Bid)
  845.      {
  846.       ObjectCreate("lo_2_p4",OBJ_TREND,0,t1_p4, lo_ma_p4_2, t2_p4, lo_ma_p4_2);
  847.       ObjectSet("lo_2_p4",OBJPROP_STYLE,STYLE_SOLID);
  848.       ObjectSet("lo_2_p4",OBJPROP_WIDTH,2);
  849.       ObjectSet("lo_2_p4",OBJPROP_RAY,false);
  850.       ObjectSet("lo_2_p4",OBJPROP_COLOR,fib_SR_shadow_3_c);
  851.       ObjectSetText("lo_2_p4",DoubleToStr(lo_ma_p4_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  852.       //----
  853.       ObjectCreate("hi_2_p4",OBJ_TREND,0,t1_p4, hi_ma_p4_2, t2_p4, hi_ma_p4_2);
  854.       ObjectSet("hi_2_p4",OBJPROP_STYLE,STYLE_SOLID);
  855.       ObjectSet("hi_2_p4",OBJPROP_WIDTH,2);
  856.       ObjectSet("hi_2_p4",OBJPROP_RAY,false);
  857.       ObjectSet("hi_2_p4",OBJPROP_COLOR,fib_SR_shadow_3_c);
  858.       ObjectSetText("hi_2_p4",DoubleToStr(hi_ma_p4_2,Digits),7,"Arial",fib_SR_shadow_3_c);
  859.      }
  860.    // 3rd level (hi_3_p4, lo_3_p4)
  861.    if(lo_ma_p4_3-hi_ma_p4_3>Ask-Bid)
  862.      {
  863.       ObjectCreate("lo_3_p4",OBJ_TREND,0,t1_p4, lo_ma_p4_3, t2_p4, lo_ma_p4_3);
  864.       ObjectSet("lo_3_p4",OBJPROP_STYLE,STYLE_SOLID);
  865.       ObjectSet("lo_3_p4",OBJPROP_WIDTH,2);
  866.       ObjectSet("lo_3_p4",OBJPROP_RAY,false);
  867.       ObjectSet("lo_3_p4",OBJPROP_COLOR,fib_SR_shadow_4_c);
  868.       ObjectSetText("lo_3_p4",DoubleToStr(lo_ma_p4_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  869.       //-----
  870.       ObjectCreate("hi_3_p4",OBJ_TREND,0,t1_p4, hi_ma_p4_3, t2_p4, hi_ma_p4_3);
  871.       ObjectSet("hi_3_p4",OBJPROP_STYLE,STYLE_SOLID);
  872.       ObjectSet("hi_3_p4",OBJPROP_WIDTH,2);
  873.       ObjectSet("hi_3_p4",OBJPROP_RAY,false);
  874.       ObjectSet("hi_3_p4",OBJPROP_COLOR,fib_SR_shadow_4_c);
  875.       ObjectSetText("hi_3_p4",DoubleToStr(hi_ma_p4_3,Digits),7,"Arial",fib_SR_shadow_4_c);
  876.      }
  877.    // 4th level (hi_4_p4, lo_4_p4)
  878.    if(lo_ma_p4_4-hi_ma_p4_4>Ask-Bid)
  879.      {
  880.       ObjectCreate("lo_4_p4",OBJ_TREND,0,t1_p4, lo_ma_p4_4, t2_p4, lo_ma_p4_4);
  881.       ObjectSet("lo_4_p4",OBJPROP_STYLE,STYLE_SOLID);
  882.       ObjectSet("lo_4_p4",OBJPROP_WIDTH,2);
  883.       ObjectSet("lo_4_p4",OBJPROP_RAY,false);
  884.       ObjectSet("lo_4_p4",OBJPROP_COLOR,fib_SR_shadow_5_c);
  885.       ObjectSetText("lo_4_p4",DoubleToStr(lo_ma_p4_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  886.       //----
  887.       ObjectCreate("hi_4_p4",OBJ_TREND,0,t1_p4, hi_ma_p4_4, t2_p4, hi_ma_p4_4);
  888.       ObjectSet("hi_4_p4",OBJPROP_STYLE,STYLE_SOLID);
  889.       ObjectSet("hi_4_p4",OBJPROP_WIDTH,2);
  890.       ObjectSet("hi_4_p4",OBJPROP_RAY,false);
  891.       ObjectSet("hi_4_p4",OBJPROP_COLOR,fib_SR_shadow_5_c);
  892.       ObjectSetText("hi_4_p4",DoubleToStr(hi_ma_p4_4,Digits),7,"Arial",fib_SR_shadow_5_c);
  893.      }
  894.    // 5th level (hi_5_p4, lo_5_p4)
  895.    if(lo_ma_p4_5-hi_ma_p4_5>Ask-Bid)
  896.      {
  897.       ObjectCreate("lo_5_p4",OBJ_TREND,0,t1_p4, lo_ma_p4_5, t2_p4, lo_ma_p4_5);
  898.       ObjectSet("lo_5_p4",OBJPROP_STYLE,STYLE_SOLID);
  899.       ObjectSet("lo_5_p4",OBJPROP_WIDTH,2);
  900.       ObjectSet("lo_5_p4",OBJPROP_RAY,false);
  901.       ObjectSet("lo_5_p4",OBJPROP_COLOR,fib_SR_shadow_6_c);
  902.       ObjectSetText("lo_5_p4",DoubleToStr(lo_ma_p4_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  903.       //----
  904.       ObjectCreate("hi_5_p4",OBJ_TREND,0,t1_p4, hi_ma_p4_5, t2_p4, hi_ma_p4_5);
  905.       ObjectSet("hi_5_p4",OBJPROP_STYLE,STYLE_SOLID);
  906.       ObjectSet("hi_5_p4",OBJPROP_WIDTH,2);
  907.       ObjectSet("hi_5_p4",OBJPROP_RAY,false);
  908.       ObjectSet("hi_5_p4",OBJPROP_COLOR,fib_SR_shadow_6_c);
  909.       ObjectSetText("hi_5_p4",DoubleToStr(hi_ma_p4_5,Digits),7,"Arial",fib_SR_shadow_6_c);
  910.      }
  911.    // 6th level (hi_6_p4, lo_6_p4)
  912.    if(lo_ma_p4_6-hi_ma_p4_6>Ask-Bid)
  913.      {
  914.       ObjectCreate("lo_6_p4",OBJ_TREND,0,t1_p4, lo_ma_p4_6, t2_p4, lo_ma_p4_6);
  915.       ObjectSet("lo_6_p4",OBJPROP_STYLE,STYLE_SOLID);
  916.       ObjectSet("lo_6_p4",OBJPROP_WIDTH,2);
  917.       ObjectSet("lo_6_p4",OBJPROP_RAY,false);
  918.       ObjectSet("lo_6_p4",OBJPROP_COLOR,fib_SR_shadow_7_c);
  919.       ObjectSetText("lo_6_p4",DoubleToStr(lo_ma_p4_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  920.       //----
  921.       ObjectCreate("hi_6_p4",OBJ_TREND,0,t1_p4, hi_ma_p4_6, t2_p4, hi_ma_p4_6);
  922.       ObjectSet("hi_6_p4",OBJPROP_STYLE,STYLE_SOLID);
  923.       ObjectSet("hi_6_p4",OBJPROP_WIDTH,2);
  924.       ObjectSet("hi_6_p4",OBJPROP_RAY,false);
  925.       ObjectSet("hi_6_p4",OBJPROP_COLOR,fib_SR_shadow_7_c);
  926.       ObjectSetText("hi_6_p4",DoubleToStr(hi_ma_p4_6,Digits),7,"Arial",fib_SR_shadow_7_c);
  927.      }
  928.    //_______________Moving Average Support & Resistance Levels______________________________
  929.    string space="             ";
  930.    ObjectCreate("ma1_p4",OBJ_TEXT,0,t1_p4,ma1_p4);//13 ma
  931.    ObjectSetText("ma1_p4",space+DoubleToStr(ma1_p4,Digits),8,"Arial",White);
  932.    ObjectCreate("ma2_p4",OBJ_TEXT,0,t1_p4,ma2_p4);//21 ma
  933.    ObjectSetText("ma2_p4",space+DoubleToStr(ma2_p4,Digits),8,"Arial",White);
  934.    ObjectCreate("ma3_p4",OBJ_TEXT,0,t1_p4,ma3_p4);//34 ma
  935. //----
  936.      if(Bid>ma3_p4) {ObjectSetText("ma3_p4",space+DoubleToStr(ma3_p4,Digits),8,"Arial",LightGreen);
  937.      }
  938.      if(Ask<ma3_p4) {ObjectSetText("ma3_p4",space+DoubleToStr(ma3_p4,Digits),8,"Arial",Pink);
  939.      }
  940.    if(Bid<=ma3_p4 && Ask>=ma3_p4)
  941.      {
  942.       ObjectSetText("ma3_p4",space+DoubleToStr(ma3_p4,Digits),8,"Arial",Yellow);
  943.      }
  944.    ObjectCreate("ma4_p4",OBJ_TEXT,0,t1_p4,ma4_p4);//55 ma
  945.      if(Bid>ma4_p4) {ObjectSetText("ma4_p4",space+DoubleToStr(ma4_p4,Digits),8,"Arial",LightGreen);
  946.      }
  947.      if(Ask<ma4_p4) {ObjectSetText("ma4_p4",space+DoubleToStr(ma4_p4,Digits),8,"Arial",Pink);
  948.      }
  949.    if(Bid<=ma4_p4 && Ask>=ma4_p4)
  950.      {
  951.       ObjectSetText("ma4_p4",space+DoubleToStr(ma4_p4,Digits),8,"Arial",Yellow);
  952.      }
  953.    ObjectCreate("ma5_p4",OBJ_TEXT,0,t1_p4,ma5_p4);//89 ma
  954.      if(Bid>ma5_p4) {ObjectSetText("ma5_p4",space+DoubleToStr(ma5_p4,Digits),8,"Arial",Green);
  955.      }
  956.      if(Ask<ma5_p4) {ObjectSetText("ma5_p4",space+DoubleToStr(ma5_p4,Digits),8,"Arial",Red);
  957.      }
  958.    if(Bid<=ma5_p4 && Ask>=ma5_p4)
  959.      {
  960.       ObjectSetText("ma5_p4",space+DoubleToStr(ma5_p4,Digits),8,"Arial",Yellow);
  961.      }
  962.    ObjectCreate("ma6_p4",OBJ_TEXT,0,t1_p4,NormalizeDouble(ma6_p4,Digits));//144 ma
  963.      if(Bid>ma6_p4) {ObjectSetText("ma6_p4",space+DoubleToStr(ma6_p4,Digits),8,"Arial",Green);
  964.      }
  965.      if(Ask<ma6_p4) {ObjectSetText("ma6_p4",space+DoubleToStr(ma6_p4,Digits),8,"Arial",Red);
  966.      }
  967.    if(Bid<=ma6_p4 && Ask>=ma6_p4)
  968.      {
  969.       ObjectSetText("ma6_p4",space+DoubleToStr(ma6_p4,Digits),8,"Arial",Yellow);
  970.      }
  971.    ObjectCreate("ma7_p4",OBJ_TEXT,0,t1_p4,NormalizeDouble(ma7_p4,Digits));//233 ma
  972.      if(Bid>ma7_p4) {ObjectSetText("ma7_p4",space+DoubleToStr(ma7_p4,Digits),8,"Arial",Green);
  973.      }
  974.      if(Ask<ma7_p4) {ObjectSetText("ma7_p4",space+DoubleToStr(ma7_p4,Digits),8,"Arial",Red);
  975.      }
  976.    if(Bid<=ma7_p4 && Ask>=ma7_p4)
  977.      {
  978.       ObjectSetText("ma7_p4",space+DoubleToStr(ma7_p4,Digits),8,"Arial",Yellow);
  979.      }
  980.   }
  981.   //end p4_Fib.Plot()
  982. //+------------------------------------------------------------------+
  983. //|                                                                  |
  984. //+------------------------------------------------------------------+
  985.   void column()
  986.   {
  987.    //..................Time Frame Columns.................................................   
  988.    string down, up;down=(string)Bid; up=(string)Ask;
  989. //----
  990.    ObjectCreate((string)p1_ma+"m "+down,OBJ_RECTANGLE,0,t1_p1,Bid,t2_p1,0);
  991.    ObjectSet((string)p1_ma+"m "+down,OBJPROP_COLOR,Red);
  992.    ObjectCreate((string)p1_ma+"m "+up,OBJ_RECTANGLE,0,t1_p1,Ask,t2_p1,Ask*1.5);
  993.    ObjectSet((string)p1_ma+"m "+up,OBJPROP_COLOR,Green);
  994. //----
  995.    ObjectCreate((string)p2_ma+"m "+down,OBJ_RECTANGLE,0,t1_p2,0,t2_p2,Bid);
  996.    ObjectSet((string)p2_ma+"m "+down,OBJPROP_COLOR,Red);
  997.    ObjectCreate((string)p2_ma+"m "+up,OBJ_RECTANGLE,0,t1_p2,Ask,t2_p2,Ask*1.5);
  998.    ObjectSet((string)p2_ma+"m "+up,OBJPROP_COLOR,Green);
  999. //----
  1000.    ObjectCreate((string)p3_ma+"m "+down,OBJ_RECTANGLE,0,t1_p3,Bid,t2_p3,0);
  1001.    ObjectSet((string)p3_ma+"m "+down,OBJPROP_COLOR,Red);
  1002.    ObjectCreate((string)p3_ma+"m "+up,OBJ_RECTANGLE,0,t1_p3,Ask,t2_p3,Ask*1.5);
  1003.    ObjectSet((string)p3_ma+"m "+up,OBJPROP_COLOR,Green);
  1004. //----
  1005.    ObjectCreate((string)p4_ma+"m "+down,OBJ_RECTANGLE,0,t1_p4,Bid,t2_p4,0);
  1006.    ObjectSet((string)p4_ma+"m "+down,OBJPROP_COLOR,Red);
  1007.    ObjectCreate((string)p4_ma+"m "+up,OBJ_RECTANGLE,0,t1_p4,Ask,t2_p4,Ask*1.5);
  1008.   ObjectSet((string)p4_ma+"m "+up,OBJPROP_COLOR,Green);}//end column();
  1009. //---- done
  1010. //+------------------------------------------------------------------+
复制代码

4周期均线.mq4

96.35 KB, 下载次数: 2, 下载积分: 活跃度 -5  [下载]

评分
  • 1
  • 2
  • 3
  • 4
  • 5
平均分:NAN    参与人数:0    我的评分:未评 下载时遇到问题?
举报

评论 使用道具

精彩评论3

1594135666
DDD
| 发表于 2024-2-22 23:54:15 | 显示全部楼层
好像是移动的斐波那契
举报

点赞 评论 使用道具

xinhua123
DDD
| 发表于 2024-2-23 14:45:12 | 显示全部楼层
楼主辛苦了
举报

点赞 评论 使用道具

aliang9887
C
| 发表于 2024-2-24 15:01:00 | 显示全部楼层
这源码都干出来了
举报

点赞 评论 使用道具

发新帖
EA交易
您需要登录后才可以评论 登录 | 立即注册

简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)