龙虎大师

 找回密码
 立即注册

微信登录,快人一步

查看: 515|回复: 50

[MQL4(MT4)] 4 Period MA w.Regr.STD

[复制链接]

1263

主题

1286

帖子

4471

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4471
发表于 2019-4-29 13:05:55 | 显示全部楼层 |阅读模式
  1. //+------------------------------------------------------------------+
  2. //|                                                   4 Period MA.mq4 |
  3. //|                 Copyright ?2006, tageiger aka fxid10t@yahoo.com |
  4. //|                                        http://www.metatrader.org |
  5. //+------------------------------------------------------------------+
  6. #property copyright "Copyright ?2006, tageiger aka fxid10t@yahoo.com"
  7. #property link      "mailto:fxid10t@yahoo.com"
  8. #property indicator_chart_window

  9. extern int p1.ma=5;//Period() in minutes
  10. extern int p2.ma=15;//Period() in minutes
  11. extern int p3.ma=60;//Period() in minutes
  12. extern int p4.ma=240;//Period() in minutes

  13. extern int STD.Rgres.length=56;
  14. extern double STD.width=0.809;

  15. extern int ma.applied.price=1;/*
  16. Applied price constants. It can be any of the following values:

  17. Constant       Value Description
  18. PRICE_CLOSE    0     Close price.
  19. PRICE_OPEN     1     Open price.
  20. PRICE_HIGH     2     High price.
  21. PRICE_LOW      3     Low price.
  22. PRICE_MEDIAN   4     Median price, (high+low)/2.
  23. PRICE_TYPICAL  5     Typical price, (high+low+close)/3.
  24. PRICE_WEIGHTED 6     Weighted close price, (high+low+close+close)/4.*/
  25. extern int ma.Method=0;/*
  26. Moving Average Method
  27. Constant    Value Description
  28. MODE_SMA    0     Simple moving average,
  29. MODE_EMA    1     Exponential moving average,
  30. MODE_SMMA   2     Smoothed moving average,
  31. MODE_LWMA   3     Linear weighted moving average.   */

  32. extern int ma1.Length=13;
  33. extern int ma2.Length=21;
  34. extern int ma3.Length=34;
  35. extern int ma4.Length=55;
  36. extern int ma5.Length=89;
  37. extern int ma6.Length=144;
  38. extern int ma7.Length=233;

  39. extern int fib.SR.shadow.1=13;
  40. extern int fib.SR.shadow.2=21;
  41. extern int fib.SR.shadow.3=34;
  42. extern int fib.SR.shadow.4=55;
  43. extern int fib.SR.shadow.5=89;
  44. extern int fib.SR.shadow.6=144;
  45. extern int fib.SR.shadow.7=233;

  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. double ma1.p1, ma2.p1, ma3.p1, ma4.p1, ma5.p1, ma6.p1, ma7.p1;
  54. double ma1.p2, ma2.p2, ma3.p2, ma4.p2, ma5.p2, ma6.p2, ma7.p2;
  55. double ma1.p3, ma2.p3, ma3.p3, ma4.p3, ma5.p3, ma6.p3, ma7.p3;
  56. double ma1.p4, ma2.p4, ma3.p4, ma4.p4, ma5.p4, ma6.p4, ma7.p4;

  57. datetime t1.p1, t2.p1, t1.p2, t2.p2, t1.p3, t2.p3, t1.p4, t2.p4;

  58. int init()  {  return(0);  }
  59. int deinit()   {
  60.    ObjectsDeleteAll(0,OBJ_TEXT);ObjectsDeleteAll(0,OBJ_RECTANGLE);
  61.    ObjectsDeleteAll(0,OBJ_ARROW);ObjectsDeleteAll(0,OBJ_TREND);   
  62. return(0);  }
  63. int start() {
  64.    ObjectsDeleteAll();
  65.    
  66.    ObjectCreate("regression channel",OBJ_REGRESSION,0,Time[STD.Rgres.length],Bid,Time[0],Ask);
  67.    ObjectSet("regression channel",OBJPROP_RAY,true);
  68.    ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,Time[STD.Rgres.length],Bid,Time[0],Ask);
  69.    ObjectSet("std channel",OBJPROP_DEVIATION,STD.width);
  70.    ObjectSet("std channel",OBJPROP_COLOR,Olive);
  71.    ObjectSet("std channel",OBJPROP_RAY,true);
  72. //p1 ma settings
  73.    ma1.p1=iMA(Symbol(),p1.ma,ma1.Length,0,ma.Method,ma.applied.price,0);
  74.    ma2.p1=iMA(Symbol(),p1.ma,ma2.Length,0,ma.Method,ma.applied.price,0);
  75.    ma3.p1=iMA(Symbol(),p1.ma,ma3.Length,0,ma.Method,ma.applied.price,0);
  76.    ma4.p1=iMA(Symbol(),p1.ma,ma4.Length,0,ma.Method,ma.applied.price,0);
  77.    ma5.p1=iMA(Symbol(),p1.ma,ma5.Length,0,ma.Method,ma.applied.price,0);
  78.    ma6.p1=iMA(Symbol(),p1.ma,ma6.Length,0,ma.Method,ma.applied.price,0);
  79.    ma7.p1=iMA(Symbol(),p1.ma,ma7.Length,0,ma.Method,ma.applied.price,0);
  80. //--------------
  81. //p2 ma settings
  82.    ma1.p2=iMA(Symbol(),p2.ma,ma1.Length,0,ma.Method,ma.applied.price,0);
  83.    ma2.p2=iMA(Symbol(),p2.ma,ma2.Length,0,ma.Method,ma.applied.price,0);
  84.    ma3.p2=iMA(Symbol(),p2.ma,ma3.Length,0,ma.Method,ma.applied.price,0);
  85.    ma4.p2=iMA(Symbol(),p2.ma,ma4.Length,0,ma.Method,ma.applied.price,0);
  86.    ma5.p2=iMA(Symbol(),p2.ma,ma5.Length,0,ma.Method,ma.applied.price,0);
  87.    ma6.p2=iMA(Symbol(),p2.ma,ma6.Length,0,ma.Method,ma.applied.price,0);
  88.    ma7.p2=iMA(Symbol(),p2.ma,ma7.Length,0,ma.Method,ma.applied.price,0);
  89. //--------------
  90. //p3 ma settings
  91.    ma1.p3=iMA(Symbol(),p3.ma,ma1.Length,0,ma.Method,ma.applied.price,0);
  92.    ma2.p3=iMA(Symbol(),p3.ma,ma2.Length,0,ma.Method,ma.applied.price,0);
  93.    ma3.p3=iMA(Symbol(),p3.ma,ma3.Length,0,ma.Method,ma.applied.price,0);
  94.    ma4.p3=iMA(Symbol(),p3.ma,ma4.Length,0,ma.Method,ma.applied.price,0);
  95.    ma5.p3=iMA(Symbol(),p3.ma,ma5.Length,0,ma.Method,ma.applied.price,0);
  96.    ma6.p3=iMA(Symbol(),p3.ma,ma6.Length,0,ma.Method,ma.applied.price,0);
  97.    ma7.p3=iMA(Symbol(),p3.ma,ma7.Length,0,ma.Method,ma.applied.price,0);
  98. //--------------
  99. //p4 ma settings
  100.    ma1.p4=iMA(Symbol(),p4.ma,ma1.Length,0,ma.Method,ma.applied.price,0);
  101.    ma2.p4=iMA(Symbol(),p4.ma,ma2.Length,0,ma.Method,ma.applied.price,0);
  102.    ma3.p4=iMA(Symbol(),p4.ma,ma3.Length,0,ma.Method,ma.applied.price,0);
  103.    ma4.p4=iMA(Symbol(),p4.ma,ma4.Length,0,ma.Method,ma.applied.price,0);
  104.    ma5.p4=iMA(Symbol(),p4.ma,ma5.Length,0,ma.Method,ma.applied.price,0);
  105.    ma6.p4=iMA(Symbol(),p4.ma,ma6.Length,0,ma.Method,ma.applied.price,0);
  106.    ma7.p4=iMA(Symbol(),p4.ma,ma7.Length,0,ma.Method,ma.applied.price,0);
  107. //--------------
  108. Time.Coordinate.Set();
  109. p1.Fib.Plot();
  110. p2.Fib.Plot();
  111. p3.Fib.Plot();
  112. p4.Fib.Plot();
  113. column();
  114. //--------------



  115. return(0);}
  116. //+------------------------------------------------------------------+
  117. void Time.Coordinate.Set()   {
  118. //....Variable Settings for Object Spatial Placement.....
  119.    double zoom.multiplier;int bpw=BarsPerWindow();
  120.    if(bpw<25)              {zoom.multiplier=0.05;}
  121.    if(bpw>25 && bpw<50)    {zoom.multiplier=0.07;}
  122.    if(bpw>50 && bpw<175)   {zoom.multiplier=0.12;}   
  123.    if(bpw>175 && bpw<375)  {zoom.multiplier=0.25;}
  124.    if(bpw>375 && bpw<750)  {zoom.multiplier=0.5;}
  125.    if(bpw>750)             {zoom.multiplier=1;}
  126.    double time.frame.multiplier;
  127.    if(Period()==1)      {time.frame.multiplier=0.65;}
  128.    if(Period()==5)      {time.frame.multiplier=3.25;}
  129.    if(Period()==15)     {time.frame.multiplier=9.75;}
  130.    if(Period()==30)     {time.frame.multiplier=19.5;}
  131.    if(Period()==60)     {time.frame.multiplier=39;}
  132.    if(Period()==240)    {time.frame.multiplier=156;}
  133.    if(Period()==1440)   {time.frame.multiplier=936;}
  134.    if(Period()==10080)  {time.frame.multiplier=6552;}
  135.    if(Period()==43200)  {time.frame.multiplier=28043;}

  136.    t1.p1=Time[0]+(1000*time.frame.multiplier*zoom.multiplier);
  137.    t2.p1=Time[0]+(3000*time.frame.multiplier*zoom.multiplier);
  138.    
  139.    t1.p2=Time[0]+(5000*time.frame.multiplier*zoom.multiplier);
  140.    t2.p2=Time[0]+(7000*time.frame.multiplier*zoom.multiplier);

  141.    t1.p3=Time[0]+(9000*time.frame.multiplier*zoom.multiplier);
  142.    t2.p3=Time[0]+(11000*time.frame.multiplier*zoom.multiplier);

  143.    t1.p4=Time[0]+(13000*time.frame.multiplier*zoom.multiplier);
  144.    t2.p4=Time[0]+(16000*time.frame.multiplier*zoom.multiplier);}//end Time.Coordinate.Set()

  145. void p1.Fib.Plot()   {
  146. //p1 dynamic fibo levels
  147.    double lo.ma.p1,hi.ma.p1;
  148.    lo.ma.p1=ma1.p1;
  149.    if(ma2.p1<lo.ma.p1)  {lo.ma.p1=ma2.p1;}
  150.    if(ma3.p1<lo.ma.p1)  {lo.ma.p1=ma3.p1;}
  151.    if(ma4.p1<lo.ma.p1)  {lo.ma.p1=ma4.p1;}
  152.    if(ma5.p1<lo.ma.p1)  {lo.ma.p1=ma5.p1;}
  153.    if(ma6.p1<lo.ma.p1)  {lo.ma.p1=ma6.p1;}
  154.    if(ma7.p1<lo.ma.p1)  {lo.ma.p1=ma7.p1;}
  155.    lo.ma.p1=NormalizeDouble(lo.ma.p1+(fib.SR.shadow.1*Point),Digits);

  156.    hi.ma.p1=ma7.p1;
  157.    if(ma6.p1>hi.ma.p1)  {hi.ma.p1=ma6.p1;}
  158.    if(ma5.p1>hi.ma.p1)  {hi.ma.p1=ma5.p1;}
  159.    if(ma4.p1>hi.ma.p1)  {hi.ma.p1=ma4.p1;}
  160.    if(ma3.p1>hi.ma.p1)  {hi.ma.p1=ma3.p1;}
  161.    if(ma2.p1>hi.ma.p1)  {hi.ma.p1=ma2.p1;}
  162.    if(ma1.p1>hi.ma.p1)  {hi.ma.p1=ma1.p1;}
  163.    hi.ma.p1=NormalizeDouble(hi.ma.p1-(fib.SR.shadow.1*Point),Digits);

  164. //p1 center dynamic fib placement      
  165.    if(lo.ma.p1-hi.ma.p1>Ask-Bid)   {
  166.       ObjectCreate("lcf.p1",OBJ_TREND,0,t1.p1, lo.ma.p1, t2.p1, lo.ma.p1);
  167.       ObjectSet("lcf.p1",OBJPROP_STYLE,STYLE_SOLID);
  168.       ObjectSet("lcf.p1",OBJPROP_WIDTH,2);
  169.       ObjectSet("lcf.p1",OBJPROP_RAY,false);
  170.       ObjectSet("lcf.p1",OBJPROP_COLOR,fib.SR.shadow.1.c);
  171.       ObjectSetText("lcf.p1",DoubleToStr(lo.ma.p1,Digits),7,"Arial",fib.SR.shadow.1.c);

  172.       ObjectCreate("hcf.p1",OBJ_TREND,0,t1.p1, hi.ma.p1, t2.p1, hi.ma.p1);
  173.       ObjectSet("hcf.p1",OBJPROP_STYLE,STYLE_SOLID);
  174.       ObjectSet("hcf.p1",OBJPROP_WIDTH,2);
  175.       ObjectSet("hcf.p1",OBJPROP_RAY,false);
  176.       ObjectSet("hcf.p1",OBJPROP_COLOR,fib.SR.shadow.1.c);
  177.       ObjectSetText("hcf.p1",DoubleToStr(hi.ma.p1,Digits),7,"Arial",fib.SR.shadow.1.c);   }      

  178.    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;
  179.    lo.ma.p1.1=lo.ma.p1+(fib.SR.shadow.2*Point);
  180.    lo.ma.p1.2=lo.ma.p1.1+(fib.SR.shadow.3*Point);
  181.    lo.ma.p1.3=lo.ma.p1.2+(fib.SR.shadow.4*Point);
  182.    lo.ma.p1.4=lo.ma.p1.3+(fib.SR.shadow.5*Point);
  183.    lo.ma.p1.5=lo.ma.p1.4+(fib.SR.shadow.6*Point);
  184.    lo.ma.p1.6=lo.ma.p1.5+(fib.SR.shadow.7*Point);
  185.      
  186.    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;
  187.    hi.ma.p1.1=hi.ma.p1-(fib.SR.shadow.2*Point);
  188.    hi.ma.p1.2=hi.ma.p1.1-(fib.SR.shadow.3*Point);
  189.    hi.ma.p1.3=hi.ma.p1.2-(fib.SR.shadow.4*Point);
  190.    hi.ma.p1.4=hi.ma.p1.3-(fib.SR.shadow.5*Point);
  191.    hi.ma.p1.5=hi.ma.p1.4-(fib.SR.shadow.6*Point);
  192.    hi.ma.p1.6=hi.ma.p1.5-(fib.SR.shadow.7*Point);

  193. //p1 1st level (hi.1.p1, lo.1.p1)
  194.    if(lo.ma.p1.1-hi.ma.p1.1>Ask-Bid)   {
  195.       ObjectCreate("lo.1.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.1, t2.p1, lo.ma.p1.1);
  196.       ObjectSet("lo.1.p1",OBJPROP_STYLE,STYLE_SOLID);
  197.       ObjectSet("lo.1.p1",OBJPROP_WIDTH,2);
  198.       ObjectSet("lo.1.p1",OBJPROP_RAY,false);
  199.       ObjectSet("lo.1.p1",OBJPROP_COLOR,fib.SR.shadow.2.c);
  200.       ObjectSetText("lo.1.p1",DoubleToStr(lo.ma.p1.1,Digits),7,"Arial",fib.SR.shadow.2.c);

  201.       ObjectCreate("hi.1.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.1, t2.p1, hi.ma.p1.1);
  202.       ObjectSet("hi.1.p1",OBJPROP_STYLE,STYLE_SOLID);
  203.       ObjectSet("hi.1.p1",OBJPROP_WIDTH,2);
  204.       ObjectSet("hi.1.p1",OBJPROP_RAY,false);
  205.       ObjectSet("hi.1.p1",OBJPROP_COLOR,fib.SR.shadow.2.c);
  206.       ObjectSetText("hi.1.p1",DoubleToStr(hi.ma.p1.1,Digits),7,"Arial",fib.SR.shadow.2.c);   }

  207. // 2st level (hi.2.p1, lo.2.p1)
  208.    if(lo.ma.p1.2-hi.ma.p1.2>Ask-Bid)   {
  209.       ObjectCreate("lo.2.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.2, t2.p1, lo.ma.p1.2);
  210.       ObjectSet("lo.2.p1",OBJPROP_STYLE,STYLE_SOLID);
  211.       ObjectSet("lo.2.p1",OBJPROP_WIDTH,2);
  212.       ObjectSet("lo.2.p1",OBJPROP_RAY,false);
  213.       ObjectSet("lo.2.p1",OBJPROP_COLOR,fib.SR.shadow.3.c);
  214.       ObjectSetText("lo.2.p1",DoubleToStr(lo.ma.p1.2,Digits),7,"Arial",fib.SR.shadow.3.c);

  215.       ObjectCreate("hi.2.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.2, t2.p1, hi.ma.p1.2);
  216.       ObjectSet("hi.2.p1",OBJPROP_STYLE,STYLE_SOLID);
  217.       ObjectSet("hi.2.p1",OBJPROP_WIDTH,2);
  218.       ObjectSet("hi.2.p1",OBJPROP_RAY,false);
  219.       ObjectSet("hi.2.p1",OBJPROP_COLOR,fib.SR.shadow.3.c);
  220.       ObjectSetText("hi.2.p1",DoubleToStr(hi.ma.p1.2,Digits),7,"Arial",fib.SR.shadow.3.c);   }     

  221. // 3rd level (hi.3.p1, lo.3.p1)
  222.    if(lo.ma.p1.3-hi.ma.p1.3>Ask-Bid)   {
  223.       ObjectCreate("lo.3.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.3, t2.p1, lo.ma.p1.3);
  224.       ObjectSet("lo.3.p1",OBJPROP_STYLE,STYLE_SOLID);
  225.       ObjectSet("lo.3.p1",OBJPROP_WIDTH,2);
  226.       ObjectSet("lo.3.p1",OBJPROP_RAY,false);
  227.       ObjectSet("lo.3.p1",OBJPROP_COLOR,fib.SR.shadow.4.c);
  228.       ObjectSetText("lo.3.p1",DoubleToStr(lo.ma.p1.3,Digits),7,"Arial",fib.SR.shadow.4.c);

  229.       ObjectCreate("hi.3.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.3, t2.p1, hi.ma.p1.3);
  230.       ObjectSet("hi.3.p1",OBJPROP_STYLE,STYLE_SOLID);
  231.       ObjectSet("hi.3.p1",OBJPROP_WIDTH,2);
  232.       ObjectSet("hi.3.p1",OBJPROP_RAY,false);
  233.       ObjectSet("hi.3.p1",OBJPROP_COLOR,fib.SR.shadow.4.c);
  234.       ObjectSetText("hi.3.p1",DoubleToStr(hi.ma.p1.3,Digits),7,"Arial",fib.SR.shadow.4.c);   }   

  235. // 4th level (hi.4.p1, lo.4.p1)
  236.    if(lo.ma.p1.4-hi.ma.p1.4>Ask-Bid)   {
  237.       ObjectCreate("lo.4.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.4, t2.p1, lo.ma.p1.4);
  238.       ObjectSet("lo.4.p1",OBJPROP_STYLE,STYLE_SOLID);
  239.       ObjectSet("lo.4.p1",OBJPROP_WIDTH,2);
  240.       ObjectSet("lo.4.p1",OBJPROP_RAY,false);
  241.       ObjectSet("lo.4.p1",OBJPROP_COLOR,fib.SR.shadow.5.c);
  242.       ObjectSetText("lo.4.p1",DoubleToStr(lo.ma.p1.4,Digits),7,"Arial",fib.SR.shadow.5.c);

  243.       ObjectCreate("hi.4.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.4, t2.p1, hi.ma.p1.4);
  244.       ObjectSet("hi.4.p1",OBJPROP_STYLE,STYLE_SOLID);
  245.       ObjectSet("hi.4.p1",OBJPROP_WIDTH,2);
  246.       ObjectSet("hi.4.p1",OBJPROP_RAY,false);
  247.       ObjectSet("hi.4.p1",OBJPROP_COLOR,fib.SR.shadow.5.c);
  248.       ObjectSetText("hi.4.p1",DoubleToStr(hi.ma.p1.4,Digits),7,"Arial",fib.SR.shadow.5.c);   }

  249. // 5th level (hi.5.p1, lo.5.p1)
  250.    if(lo.ma.p1.5-hi.ma.p1.5>Ask-Bid)   {
  251.       ObjectCreate("lo.5.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.5, t2.p1, lo.ma.p1.5);
  252.       ObjectSet("lo.5.p1",OBJPROP_STYLE,STYLE_SOLID);
  253.       ObjectSet("lo.5.p1",OBJPROP_WIDTH,2);
  254.       ObjectSet("lo.5.p1",OBJPROP_RAY,false);
  255.       ObjectSet("lo.5.p1",OBJPROP_COLOR,fib.SR.shadow.6.c);
  256.       ObjectSetText("lo.5.p1",DoubleToStr(lo.ma.p1.5,Digits),7,"Arial",fib.SR.shadow.6.c);

  257.       ObjectCreate("hi.5.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.5, t2.p1, hi.ma.p1.5);
  258.       ObjectSet("hi.5.p1",OBJPROP_STYLE,STYLE_SOLID);
  259.       ObjectSet("hi.5.p1",OBJPROP_WIDTH,2);
  260.       ObjectSet("hi.5.p1",OBJPROP_RAY,false);
  261.       ObjectSet("hi.5.p1",OBJPROP_COLOR,fib.SR.shadow.6.c);
  262.       ObjectSetText("hi.5.p1",DoubleToStr(hi.ma.p1.5,Digits),7,"Arial",fib.SR.shadow.6.c);   }

  263. // 6th level (hi.6.p1, lo.6.p1)
  264.    if(lo.ma.p1.6-hi.ma.p1.6>Ask-Bid)   {
  265.       ObjectCreate("lo.6.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.6, t2.p1, lo.ma.p1.6);
  266.       ObjectSet("lo.6.p1",OBJPROP_STYLE,STYLE_SOLID);
  267.       ObjectSet("lo.6.p1",OBJPROP_WIDTH,2);
  268.       ObjectSet("lo.6.p1",OBJPROP_RAY,false);
  269.       ObjectSet("lo.6.p1",OBJPROP_COLOR,fib.SR.shadow.7.c);
  270.       ObjectSetText("lo.6.p1",DoubleToStr(lo.ma.p1.6,Digits),7,"Arial",fib.SR.shadow.7.c);

  271.       ObjectCreate("hi.6.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.6, t2.p1, hi.ma.p1.6);
  272.       ObjectSet("hi.6.p1",OBJPROP_STYLE,STYLE_SOLID);
  273.       ObjectSet("hi.6.p1",OBJPROP_WIDTH,2);
  274.       ObjectSet("hi.6.p1",OBJPROP_RAY,false);
  275.       ObjectSet("hi.6.p1",OBJPROP_COLOR,fib.SR.shadow.7.c);
  276.       ObjectSetText("hi.6.p1",DoubleToStr(hi.ma.p1.6,Digits),7,"Arial",fib.SR.shadow.7.c);   }
  277. //...............Moving Average Support & Resistance Levels..............................
  278.    string space="             ";
  279.       ObjectCreate("ma1.p1",OBJ_TEXT,0,t1.p1,ma1.p1);//13 ma
  280.       ObjectSetText("ma1.p1",space+DoubleToStr(ma1.p1,Digits),8,"Arial",White);

  281.       ObjectCreate("ma2.p1",OBJ_TEXT,0,t1.p1,ma2.p1);//21 ma
  282.       ObjectSetText("ma2.p1",space+DoubleToStr(ma2.p1,Digits),8,"Arial",White);      

  283.       ObjectCreate("ma3.p1",OBJ_TEXT,0,t1.p1,ma3.p1);//34 ma
  284.       if(Bid>ma3.p1) {ObjectSetText("ma3.p1",space+DoubleToStr(ma3.p1,Digits),8,"Arial",LightGreen);}
  285.       if(Ask<ma3.p1) {ObjectSetText("ma3.p1",space+DoubleToStr(ma3.p1,Digits),8,"Arial",Pink);}
  286.       if(Bid<=ma3.p1 && Ask>=ma3.p1)  {
  287.          ObjectSetText("ma3.p1",space+DoubleToStr(ma3.p1,Digits),8,"Arial",Yellow);}

  288.       ObjectCreate("ma4.p1",OBJ_TEXT,0,t1.p1,ma4.p1);//55 ma
  289.       if(Bid>ma4.p1) {ObjectSetText("ma4.p1",space+DoubleToStr(ma4.p1,Digits),8,"Arial",LightGreen);}
  290.       if(Ask<ma4.p1) {ObjectSetText("ma4.p1",space+DoubleToStr(ma4.p1,Digits),8,"Arial",Pink);}
  291.       if(Bid<=ma4.p1 && Ask>=ma4.p1)  {
  292.          ObjectSetText("ma4.p1",space+DoubleToStr(ma4.p1,Digits),8,"Arial",Yellow);}

  293.       ObjectCreate("ma5.p1",OBJ_TEXT,0,t1.p1,ma5.p1);//89 ma
  294.       if(Bid>ma5.p1) {ObjectSetText("ma5.p1",space+DoubleToStr(ma5.p1,Digits),8,"Arial",Green);}
  295.       if(Ask<ma5.p1) {ObjectSetText("ma5.p1",space+DoubleToStr(ma5.p1,Digits),8,"Arial",Red);}
  296.       if(Bid<=ma5.p1 && Ask>=ma5.p1)  {
  297.          ObjectSetText("ma5.p1",space+DoubleToStr(ma5.p1,Digits),8,"Arial",Yellow);}

  298.       ObjectCreate("ma6.p1",OBJ_TEXT,0,t1.p1,NormalizeDouble(ma6.p1,Digits));//144 ma
  299.       if(Bid>ma6.p1) {ObjectSetText("ma6.p1",space+DoubleToStr(ma6.p1,Digits),8,"Arial",Green);}
  300.       if(Ask<ma6.p1) {ObjectSetText("ma6.p1",space+DoubleToStr(ma6.p1,Digits),8,"Arial",Red);}
  301.       if(Bid<=ma6.p1 && Ask>=ma6.p1)  {
  302.          ObjectSetText("ma6.p1",space+DoubleToStr(ma6.p1,Digits),8,"Arial",Yellow);}

  303.       ObjectCreate("ma7.p1",OBJ_TEXT,0,t1.p1,NormalizeDouble(ma7.p1,Digits));//233 ma
  304.       if(Bid>ma7.p1) {ObjectSetText("ma7.p1",space+DoubleToStr(ma7.p1,Digits),8,"Arial",Green);}
  305.       if(Ask<ma7.p1) {ObjectSetText("ma7.p1",space+DoubleToStr(ma7.p1,Digits),8,"Arial",Red);}
  306.       if(Bid<=ma7.p1 && Ask>=ma7.p1)  {
  307.          ObjectSetText("ma7.p1",space+DoubleToStr(ma7.p1,Digits),8,"Arial",Yellow);}
  308. }//end p1.Fib.Plot()

  309. void p2.Fib.Plot()   {
  310. //p2 dynamic fibo levels
  311.    double lo.ma.p2,hi.ma.p2;
  312.    lo.ma.p2=ma1.p2;
  313.    if(ma2.p2<lo.ma.p2)  {lo.ma.p2=ma2.p2;}
  314.    if(ma3.p2<lo.ma.p2)  {lo.ma.p2=ma3.p2;}
  315.    if(ma4.p2<lo.ma.p2)  {lo.ma.p2=ma4.p2;}
  316.    if(ma5.p2<lo.ma.p2)  {lo.ma.p2=ma5.p2;}
  317.    if(ma6.p2<lo.ma.p2)  {lo.ma.p2=ma6.p2;}
  318.    if(ma7.p2<lo.ma.p2)  {lo.ma.p2=ma7.p2;}
  319.    lo.ma.p2=NormalizeDouble(lo.ma.p2+(fib.SR.shadow.1*Point),Digits);

  320.    hi.ma.p2=ma7.p2;
  321.    if(ma6.p2>hi.ma.p2)  {hi.ma.p2=ma6.p2;}
  322.    if(ma5.p2>hi.ma.p2)  {hi.ma.p2=ma5.p2;}
  323.    if(ma4.p2>hi.ma.p2)  {hi.ma.p2=ma4.p2;}
  324.    if(ma3.p2>hi.ma.p2)  {hi.ma.p2=ma3.p2;}
  325.    if(ma2.p2>hi.ma.p2)  {hi.ma.p2=ma2.p2;}
  326.    if(ma1.p2>hi.ma.p2)  {hi.ma.p2=ma1.p2;}
  327.    hi.ma.p2=NormalizeDouble(hi.ma.p2-(fib.SR.shadow.1*Point),Digits);

  328. //p2 center dynamic fib placement      
  329.    if(lo.ma.p2-hi.ma.p2>Ask-Bid)   {
  330.       ObjectCreate("lcf.p2",OBJ_TREND,0,t1.p2, lo.ma.p2, t2.p2, lo.ma.p2);
  331.       ObjectSet("lcf.p2",OBJPROP_STYLE,STYLE_SOLID);
  332.       ObjectSet("lcf.p2",OBJPROP_WIDTH,2);
  333.       ObjectSet("lcf.p2",OBJPROP_RAY,false);
  334.       ObjectSet("lcf.p2",OBJPROP_COLOR,fib.SR.shadow.1.c);
  335.       ObjectSetText("lcf.p2",DoubleToStr(lo.ma.p2,Digits),7,"Arial",fib.SR.shadow.1.c);

  336.       ObjectCreate("hcf.p2",OBJ_TREND,0,t1.p2, hi.ma.p2, t2.p2, hi.ma.p2);
  337.       ObjectSet("hcf.p2",OBJPROP_STYLE,STYLE_SOLID);
  338.       ObjectSet("hcf.p2",OBJPROP_WIDTH,2);
  339.       ObjectSet("hcf.p2",OBJPROP_RAY,false);
  340.       ObjectSet("hcf.p2",OBJPROP_COLOR,fib.SR.shadow.1.c);
  341.       ObjectSetText("hcf.p2",DoubleToStr(hi.ma.p2,Digits),7,"Arial",fib.SR.shadow.1.c);   }      

  342.    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;
  343.    lo.ma.p2.1=lo.ma.p2+(fib.SR.shadow.2*Point);
  344.    lo.ma.p2.2=lo.ma.p2.1+(fib.SR.shadow.3*Point);
  345.    lo.ma.p2.3=lo.ma.p2.2+(fib.SR.shadow.4*Point);
  346.    lo.ma.p2.4=lo.ma.p2.3+(fib.SR.shadow.5*Point);
  347.    lo.ma.p2.5=lo.ma.p2.4+(fib.SR.shadow.6*Point);
  348.    lo.ma.p2.6=lo.ma.p2.5+(fib.SR.shadow.7*Point);
  349.      
  350.    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;
  351.    hi.ma.p2.1=hi.ma.p2-(fib.SR.shadow.2*Point);
  352.    hi.ma.p2.2=hi.ma.p2.1-(fib.SR.shadow.3*Point);
  353.    hi.ma.p2.3=hi.ma.p2.2-(fib.SR.shadow.4*Point);
  354.    hi.ma.p2.4=hi.ma.p2.3-(fib.SR.shadow.5*Point);
  355.    hi.ma.p2.5=hi.ma.p2.4-(fib.SR.shadow.6*Point);
  356.    hi.ma.p2.6=hi.ma.p2.5-(fib.SR.shadow.7*Point);

  357. //p2 1st level (hi.1.p2, lo.1.p2)
  358.    if(lo.ma.p2.1-hi.ma.p2.1>Ask-Bid)   {
  359.       ObjectCreate("lo.1.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.1, t2.p2, lo.ma.p2.1);
  360.       ObjectSet("lo.1.p2",OBJPROP_STYLE,STYLE_SOLID);
  361.       ObjectSet("lo.1.p2",OBJPROP_WIDTH,2);
  362.       ObjectSet("lo.1.p2",OBJPROP_RAY,false);
  363.       ObjectSet("lo.1.p2",OBJPROP_COLOR,fib.SR.shadow.2.c);
  364.       ObjectSetText("lo.1.p2",DoubleToStr(lo.ma.p2.1,Digits),7,"Arial",fib.SR.shadow.2.c);

  365.       ObjectCreate("hi.1.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.1, t2.p2, hi.ma.p2.1);
  366.       ObjectSet("hi.1.p2",OBJPROP_STYLE,STYLE_SOLID);
  367.       ObjectSet("hi.1.p2",OBJPROP_WIDTH,2);
  368.       ObjectSet("hi.1.p2",OBJPROP_RAY,false);
  369.       ObjectSet("hi.1.p2",OBJPROP_COLOR,fib.SR.shadow.2.c);
  370.       ObjectSetText("hi.1.p2",DoubleToStr(hi.ma.p2.1,Digits),7,"Arial",fib.SR.shadow.2.c);   }

  371. // 2st level (hi.2.p2, lo.2.p2)
  372.    if(lo.ma.p2.2-hi.ma.p2.2>Ask-Bid)   {
  373.       ObjectCreate("lo.2.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.2, t2.p2, lo.ma.p2.2);
  374.       ObjectSet("lo.2.p2",OBJPROP_STYLE,STYLE_SOLID);
  375.       ObjectSet("lo.2.p2",OBJPROP_WIDTH,2);
  376.       ObjectSet("lo.2.p2",OBJPROP_RAY,false);
  377.       ObjectSet("lo.2.p2",OBJPROP_COLOR,fib.SR.shadow.3.c);
  378.       ObjectSetText("lo.2.p2",DoubleToStr(lo.ma.p2.2,Digits),7,"Arial",fib.SR.shadow.3.c);

  379.       ObjectCreate("hi.2.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.2, t2.p2, hi.ma.p2.2);
  380.       ObjectSet("hi.2.p2",OBJPROP_STYLE,STYLE_SOLID);
  381.       ObjectSet("hi.2.p2",OBJPROP_WIDTH,2);
  382.       ObjectSet("hi.2.p2",OBJPROP_RAY,false);
  383.       ObjectSet("hi.2.p2",OBJPROP_COLOR,fib.SR.shadow.3.c);
  384.       ObjectSetText("hi.2.p2",DoubleToStr(hi.ma.p2.2,Digits),7,"Arial",fib.SR.shadow.3.c);   }     

  385. // 3rd level (hi.3.p2, lo.3.p2)
  386.    if(lo.ma.p2.3-hi.ma.p2.3>Ask-Bid)   {
  387.       ObjectCreate("lo.3.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.3, t2.p2, lo.ma.p2.3);
  388.       ObjectSet("lo.3.p2",OBJPROP_STYLE,STYLE_SOLID);
  389.       ObjectSet("lo.3.p2",OBJPROP_WIDTH,2);
  390.       ObjectSet("lo.3.p2",OBJPROP_RAY,false);
  391.       ObjectSet("lo.3.p2",OBJPROP_COLOR,fib.SR.shadow.4.c);
  392.       ObjectSetText("lo.3.p2",DoubleToStr(lo.ma.p2.3,Digits),7,"Arial",fib.SR.shadow.4.c);

  393.       ObjectCreate("hi.3.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.3, t2.p2, hi.ma.p2.3);
  394.       ObjectSet("hi.3.p2",OBJPROP_STYLE,STYLE_SOLID);
  395.       ObjectSet("hi.3.p2",OBJPROP_WIDTH,2);
  396.       ObjectSet("hi.3.p2",OBJPROP_RAY,false);
  397.       ObjectSet("hi.3.p2",OBJPROP_COLOR,fib.SR.shadow.4.c);
  398.       ObjectSetText("hi.3.p2",DoubleToStr(hi.ma.p2.3,Digits),7,"Arial",fib.SR.shadow.4.c);   }   

  399. // 4th level (hi.4.p2, lo.4.p2)
  400.    if(lo.ma.p2.4-hi.ma.p2.4>Ask-Bid)   {
  401.       ObjectCreate("lo.4.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.4, t2.p2, lo.ma.p2.4);
  402.       ObjectSet("lo.4.p2",OBJPROP_STYLE,STYLE_SOLID);
  403.       ObjectSet("lo.4.p2",OBJPROP_WIDTH,2);
  404.       ObjectSet("lo.4.p2",OBJPROP_RAY,false);
  405.       ObjectSet("lo.4.p2",OBJPROP_COLOR,fib.SR.shadow.5.c);
  406.       ObjectSetText("lo.4.p2",DoubleToStr(lo.ma.p2.4,Digits),7,"Arial",fib.SR.shadow.5.c);

  407.       ObjectCreate("hi.4.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.4, t2.p2, hi.ma.p2.4);
  408.       ObjectSet("hi.4.p2",OBJPROP_STYLE,STYLE_SOLID);
  409.       ObjectSet("hi.4.p2",OBJPROP_WIDTH,2);
  410.       ObjectSet("hi.4.p2",OBJPROP_RAY,false);
  411.       ObjectSet("hi.4.p2",OBJPROP_COLOR,fib.SR.shadow.5.c);
  412.       ObjectSetText("hi.4.p2",DoubleToStr(hi.ma.p2.4,Digits),7,"Arial",fib.SR.shadow.5.c);   }

  413. // 5th level (hi.5.p2, lo.5.p2)
  414.    if(lo.ma.p2.5-hi.ma.p2.5>Ask-Bid)   {
  415.       ObjectCreate("lo.5.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.5, t2.p2, lo.ma.p2.5);
  416.       ObjectSet("lo.5.p2",OBJPROP_STYLE,STYLE_SOLID);
  417.       ObjectSet("lo.5.p2",OBJPROP_WIDTH,2);
  418.       ObjectSet("lo.5.p2",OBJPROP_RAY,false);
  419.       ObjectSet("lo.5.p2",OBJPROP_COLOR,fib.SR.shadow.6.c);
  420.       ObjectSetText("lo.5.p2",DoubleToStr(lo.ma.p2.5,Digits),7,"Arial",fib.SR.shadow.6.c);

  421.       ObjectCreate("hi.5.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.5, t2.p2, hi.ma.p2.5);
  422.       ObjectSet("hi.5.p2",OBJPROP_STYLE,STYLE_SOLID);
  423.       ObjectSet("hi.5.p2",OBJPROP_WIDTH,2);
  424.       ObjectSet("hi.5.p2",OBJPROP_RAY,false);
  425.       ObjectSet("hi.5.p2",OBJPROP_COLOR,fib.SR.shadow.6.c);
  426.       ObjectSetText("hi.5.p2",DoubleToStr(hi.ma.p2.5,Digits),7,"Arial",fib.SR.shadow.6.c);   }

  427. // 6th level (hi.6.p2, lo.6.p2)
  428.    if(lo.ma.p2.6-hi.ma.p2.6>Ask-Bid)   {
  429.       ObjectCreate("lo.6.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.6, t2.p2, lo.ma.p2.6);
  430.       ObjectSet("lo.6.p2",OBJPROP_STYLE,STYLE_SOLID);
  431.       ObjectSet("lo.6.p2",OBJPROP_WIDTH,2);
  432.       ObjectSet("lo.6.p2",OBJPROP_RAY,false);
  433.       ObjectSet("lo.6.p2",OBJPROP_COLOR,fib.SR.shadow.7.c);
  434.       ObjectSetText("lo.6.p2",DoubleToStr(lo.ma.p2.6,Digits),7,"Arial",fib.SR.shadow.7.c);

  435.       ObjectCreate("hi.6.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.6, t2.p2, hi.ma.p2.6);
  436.       ObjectSet("hi.6.p2",OBJPROP_STYLE,STYLE_SOLID);
  437.       ObjectSet("hi.6.p2",OBJPROP_WIDTH,2);
  438.       ObjectSet("hi.6.p2",OBJPROP_RAY,false);
  439.       ObjectSet("hi.6.p2",OBJPROP_COLOR,fib.SR.shadow.7.c);
  440.       ObjectSetText("hi.6.p2",DoubleToStr(hi.ma.p2.6,Digits),7,"Arial",fib.SR.shadow.7.c);   }
  441. //...............Moving Average Support & Resistance Levels..............................
  442.    string space="             ";
  443.       ObjectCreate("ma1.p2",OBJ_TEXT,0,t1.p2,ma1.p2);//13 ma
  444.       ObjectSetText("ma1.p2",space+DoubleToStr(ma1.p2,Digits),8,"Arial",White);

  445.       ObjectCreate("ma2.p2",OBJ_TEXT,0,t1.p2,ma2.p2);//21 ma
  446.       ObjectSetText("ma2.p2",space+DoubleToStr(ma2.p2,Digits),8,"Arial",White);      

  447.       ObjectCreate("ma3.p2",OBJ_TEXT,0,t1.p2,ma3.p2);//34 ma
  448.       if(Bid>ma3.p2) {ObjectSetText("ma3.p2",space+DoubleToStr(ma3.p2,Digits),8,"Arial",LightGreen);}
  449.       if(Ask<ma3.p2) {ObjectSetText("ma3.p2",space+DoubleToStr(ma3.p2,Digits),8,"Arial",Pink);}
  450.       if(Bid<=ma3.p2 && Ask>=ma3.p2)  {
  451.          ObjectSetText("ma3.p2",space+DoubleToStr(ma3.p2,Digits),8,"Arial",Yellow);}

  452.       ObjectCreate("ma4.p2",OBJ_TEXT,0,t1.p2,ma4.p2);//55 ma
  453.       if(Bid>ma4.p2) {ObjectSetText("ma4.p2",space+DoubleToStr(ma4.p2,Digits),8,"Arial",LightGreen);}
  454.       if(Ask<ma4.p2) {ObjectSetText("ma4.p2",space+DoubleToStr(ma4.p2,Digits),8,"Arial",Pink);}
  455.       if(Bid<=ma4.p2 && Ask>=ma4.p2)  {
  456.          ObjectSetText("ma4.p2",space+DoubleToStr(ma4.p2,Digits),8,"Arial",Yellow);}

  457.       ObjectCreate("ma5.p2",OBJ_TEXT,0,t1.p2,ma5.p2);//89 ma
  458.       if(Bid>ma5.p2) {ObjectSetText("ma5.p2",space+DoubleToStr(ma5.p2,Digits),8,"Arial",Green);}
  459.       if(Ask<ma5.p2) {ObjectSetText("ma5.p2",space+DoubleToStr(ma5.p2,Digits),8,"Arial",Red);}
  460.       if(Bid<=ma5.p2 && Ask>=ma5.p2)  {
  461.          ObjectSetText("ma5.p2",space+DoubleToStr(ma5.p2,Digits),8,"Arial",Yellow);}

  462.       ObjectCreate("ma6.p2",OBJ_TEXT,0,t1.p2,NormalizeDouble(ma6.p2,Digits));//144 ma
  463.       if(Bid>ma6.p2) {ObjectSetText("ma6.p2",space+DoubleToStr(ma6.p2,Digits),8,"Arial",Green);}
  464.       if(Ask<ma6.p2) {ObjectSetText("ma6.p2",space+DoubleToStr(ma6.p2,Digits),8,"Arial",Red);}
  465.       if(Bid<=ma6.p2 && Ask>=ma6.p2)  {
  466.          ObjectSetText("ma6.p2",space+DoubleToStr(ma6.p2,Digits),8,"Arial",Yellow);}

  467.       ObjectCreate("ma7.p2",OBJ_TEXT,0,t1.p2,NormalizeDouble(ma7.p2,Digits));//233 ma
  468.       if(Bid>ma7.p2) {ObjectSetText("ma7.p2",space+DoubleToStr(ma7.p2,Digits),8,"Arial",Green);}
  469.       if(Ask<ma7.p2) {ObjectSetText("ma7.p2",space+DoubleToStr(ma7.p2,Digits),8,"Arial",Red);}
  470.       if(Bid<=ma7.p2 && Ask>=ma7.p2)  {
  471.          ObjectSetText("ma7.p2",space+DoubleToStr(ma7.p2,Digits),8,"Arial",Yellow);}
  472. }//end p2.Fib.Plot()

  473. void p3.Fib.Plot()   {
  474. //p3 dynamic fibo levels
  475.    double lo.ma.p3,hi.ma.p3;
  476.    lo.ma.p3=ma1.p3;
  477.    if(ma2.p3<lo.ma.p3)  {lo.ma.p3=ma2.p3;}
  478.    if(ma3.p3<lo.ma.p3)  {lo.ma.p3=ma3.p3;}
  479.    if(ma4.p3<lo.ma.p3)  {lo.ma.p3=ma4.p3;}
  480.    if(ma5.p3<lo.ma.p3)  {lo.ma.p3=ma5.p3;}
  481.    if(ma6.p3<lo.ma.p3)  {lo.ma.p3=ma6.p3;}
  482.    if(ma7.p3<lo.ma.p3)  {lo.ma.p3=ma7.p3;}
  483.    lo.ma.p3=NormalizeDouble(lo.ma.p3+(fib.SR.shadow.1*Point),Digits);

  484.    hi.ma.p3=ma7.p3;
  485.    if(ma6.p3>hi.ma.p3)  {hi.ma.p3=ma6.p3;}
  486.    if(ma5.p3>hi.ma.p3)  {hi.ma.p3=ma5.p3;}
  487.    if(ma4.p3>hi.ma.p3)  {hi.ma.p3=ma4.p3;}
  488.    if(ma3.p3>hi.ma.p3)  {hi.ma.p3=ma3.p3;}
  489.    if(ma2.p3>hi.ma.p3)  {hi.ma.p3=ma2.p3;}
  490.    if(ma1.p3>hi.ma.p3)  {hi.ma.p3=ma1.p3;}
  491.    hi.ma.p3=NormalizeDouble(hi.ma.p3-(fib.SR.shadow.1*Point),Digits);

  492. //p3 center dynamic fib placement      
  493.    if(lo.ma.p3-hi.ma.p3>Ask-Bid)   {
  494.       ObjectCreate("lcf.p3",OBJ_TREND,0,t1.p3, lo.ma.p3, t2.p3, lo.ma.p3);
  495.       ObjectSet("lcf.p3",OBJPROP_STYLE,STYLE_SOLID);
  496.       ObjectSet("lcf.p3",OBJPROP_WIDTH,2);
  497.       ObjectSet("lcf.p3",OBJPROP_RAY,false);
  498.       ObjectSet("lcf.p3",OBJPROP_COLOR,fib.SR.shadow.1.c);
  499.       ObjectSetText("lcf.p3",DoubleToStr(lo.ma.p3,Digits),7,"Arial",fib.SR.shadow.1.c);

  500.       ObjectCreate("hcf.p3",OBJ_TREND,0,t1.p3, hi.ma.p3, t2.p3, hi.ma.p3);
  501.       ObjectSet("hcf.p3",OBJPROP_STYLE,STYLE_SOLID);
  502.       ObjectSet("hcf.p3",OBJPROP_WIDTH,2);
  503.       ObjectSet("hcf.p3",OBJPROP_RAY,false);
  504.       ObjectSet("hcf.p3",OBJPROP_COLOR,fib.SR.shadow.1.c);
  505.       ObjectSetText("hcf.p3",DoubleToStr(hi.ma.p3,Digits),7,"Arial",fib.SR.shadow.1.c);   }      

  506.    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;
  507.    lo.ma.p3.1=lo.ma.p3+(fib.SR.shadow.2*Point);
  508.    lo.ma.p3.2=lo.ma.p3.1+(fib.SR.shadow.3*Point);
  509.    lo.ma.p3.3=lo.ma.p3.2+(fib.SR.shadow.4*Point);
  510.    lo.ma.p3.4=lo.ma.p3.3+(fib.SR.shadow.5*Point);
  511.    lo.ma.p3.5=lo.ma.p3.4+(fib.SR.shadow.6*Point);
  512.    lo.ma.p3.6=lo.ma.p3.5+(fib.SR.shadow.7*Point);
  513.      
  514.    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;
  515.    hi.ma.p3.1=hi.ma.p3-(fib.SR.shadow.2*Point);
  516.    hi.ma.p3.2=hi.ma.p3.1-(fib.SR.shadow.3*Point);
  517.    hi.ma.p3.3=hi.ma.p3.2-(fib.SR.shadow.4*Point);
  518.    hi.ma.p3.4=hi.ma.p3.3-(fib.SR.shadow.5*Point);
  519.    hi.ma.p3.5=hi.ma.p3.4-(fib.SR.shadow.6*Point);
  520.    hi.ma.p3.6=hi.ma.p3.5-(fib.SR.shadow.7*Point);

  521. //p3 1st level (hi.1.p3, lo.1.p3)
  522.    if(lo.ma.p3.1-hi.ma.p3.1>Ask-Bid)   {
  523.       ObjectCreate("lo.1.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.1, t2.p3, lo.ma.p3.1);
  524.       ObjectSet("lo.1.p3",OBJPROP_STYLE,STYLE_SOLID);
  525.       ObjectSet("lo.1.p3",OBJPROP_WIDTH,2);
  526.       ObjectSet("lo.1.p3",OBJPROP_RAY,false);
  527.       ObjectSet("lo.1.p3",OBJPROP_COLOR,fib.SR.shadow.2.c);
  528.       ObjectSetText("lo.1.p3",DoubleToStr(lo.ma.p3.1,Digits),7,"Arial",fib.SR.shadow.2.c);

  529.       ObjectCreate("hi.1.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.1, t2.p3, hi.ma.p3.1);
  530.       ObjectSet("hi.1.p3",OBJPROP_STYLE,STYLE_SOLID);
  531.       ObjectSet("hi.1.p3",OBJPROP_WIDTH,2);
  532.       ObjectSet("hi.1.p3",OBJPROP_RAY,false);
  533.       ObjectSet("hi.1.p3",OBJPROP_COLOR,fib.SR.shadow.2.c);
  534.       ObjectSetText("hi.1.p3",DoubleToStr(hi.ma.p3.1,Digits),7,"Arial",fib.SR.shadow.2.c);   }

  535. // 2st level (hi.2.p3, lo.2.p3)
  536.    if(lo.ma.p3.2-hi.ma.p3.2>Ask-Bid)   {
  537.       ObjectCreate("lo.2.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.2, t2.p3, lo.ma.p3.2);
  538.       ObjectSet("lo.2.p3",OBJPROP_STYLE,STYLE_SOLID);
  539.       ObjectSet("lo.2.p3",OBJPROP_WIDTH,2);
  540.       ObjectSet("lo.2.p3",OBJPROP_RAY,false);
  541.       ObjectSet("lo.2.p3",OBJPROP_COLOR,fib.SR.shadow.3.c);
  542.       ObjectSetText("lo.2.p3",DoubleToStr(lo.ma.p3.2,Digits),7,"Arial",fib.SR.shadow.3.c);

  543.       ObjectCreate("hi.2.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.2, t2.p3, hi.ma.p3.2);
  544.       ObjectSet("hi.2.p3",OBJPROP_STYLE,STYLE_SOLID);
  545.       ObjectSet("hi.2.p3",OBJPROP_WIDTH,2);
  546.       ObjectSet("hi.2.p3",OBJPROP_RAY,false);
  547.       ObjectSet("hi.2.p3",OBJPROP_COLOR,fib.SR.shadow.3.c);
  548.       ObjectSetText("hi.2.p3",DoubleToStr(hi.ma.p3.2,Digits),7,"Arial",fib.SR.shadow.3.c);   }     

  549. // 3rd level (hi.3.p3, lo.3.p3)
  550.    if(lo.ma.p3.3-hi.ma.p3.3>Ask-Bid)   {
  551.       ObjectCreate("lo.3.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.3, t2.p3, lo.ma.p3.3);
  552.       ObjectSet("lo.3.p3",OBJPROP_STYLE,STYLE_SOLID);
  553.       ObjectSet("lo.3.p3",OBJPROP_WIDTH,2);
  554.       ObjectSet("lo.3.p3",OBJPROP_RAY,false);
  555.       ObjectSet("lo.3.p3",OBJPROP_COLOR,fib.SR.shadow.4.c);
  556.       ObjectSetText("lo.3.p3",DoubleToStr(lo.ma.p3.3,Digits),7,"Arial",fib.SR.shadow.4.c);

  557.       ObjectCreate("hi.3.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.3, t2.p3, hi.ma.p3.3);
  558.       ObjectSet("hi.3.p3",OBJPROP_STYLE,STYLE_SOLID);
  559.       ObjectSet("hi.3.p3",OBJPROP_WIDTH,2);
  560.       ObjectSet("hi.3.p3",OBJPROP_RAY,false);
  561.       ObjectSet("hi.3.p3",OBJPROP_COLOR,fib.SR.shadow.4.c);
  562.       ObjectSetText("hi.3.p3",DoubleToStr(hi.ma.p3.3,Digits),7,"Arial",fib.SR.shadow.4.c);   }   

  563. // 4th level (hi.4.p3, lo.4.p3)
  564.    if(lo.ma.p3.4-hi.ma.p3.4>Ask-Bid)   {
  565.       ObjectCreate("lo.4.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.4, t2.p3, lo.ma.p3.4);
  566.       ObjectSet("lo.4.p3",OBJPROP_STYLE,STYLE_SOLID);
  567.       ObjectSet("lo.4.p3",OBJPROP_WIDTH,2);
  568.       ObjectSet("lo.4.p3",OBJPROP_RAY,false);
  569.       ObjectSet("lo.4.p3",OBJPROP_COLOR,fib.SR.shadow.5.c);
  570.       ObjectSetText("lo.4.p3",DoubleToStr(lo.ma.p3.4,Digits),7,"Arial",fib.SR.shadow.5.c);

  571.       ObjectCreate("hi.4.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.4, t2.p3, hi.ma.p3.4);
  572.       ObjectSet("hi.4.p3",OBJPROP_STYLE,STYLE_SOLID);
  573.       ObjectSet("hi.4.p3",OBJPROP_WIDTH,2);
  574.       ObjectSet("hi.4.p3",OBJPROP_RAY,false);
  575.       ObjectSet("hi.4.p3",OBJPROP_COLOR,fib.SR.shadow.5.c);
  576.       ObjectSetText("hi.4.p3",DoubleToStr(hi.ma.p3.4,Digits),7,"Arial",fib.SR.shadow.5.c);   }

  577. // 5th level (hi.5.p3, lo.5.p3)
  578.    if(lo.ma.p3.5-hi.ma.p3.5>Ask-Bid)   {
  579.       ObjectCreate("lo.5.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.5, t2.p3, lo.ma.p3.5);
  580.       ObjectSet("lo.5.p3",OBJPROP_STYLE,STYLE_SOLID);
  581.       ObjectSet("lo.5.p3",OBJPROP_WIDTH,2);
  582.       ObjectSet("lo.5.p3",OBJPROP_RAY,false);
  583.       ObjectSet("lo.5.p3",OBJPROP_COLOR,fib.SR.shadow.6.c);
  584.       ObjectSetText("lo.5.p3",DoubleToStr(lo.ma.p3.5,Digits),7,"Arial",fib.SR.shadow.6.c);

  585.       ObjectCreate("hi.5.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.5, t2.p3, hi.ma.p3.5);
  586.       ObjectSet("hi.5.p3",OBJPROP_STYLE,STYLE_SOLID);
  587.       ObjectSet("hi.5.p3",OBJPROP_WIDTH,2);
  588.       ObjectSet("hi.5.p3",OBJPROP_RAY,false);
  589.       ObjectSet("hi.5.p3",OBJPROP_COLOR,fib.SR.shadow.6.c);
  590.       ObjectSetText("hi.5.p3",DoubleToStr(hi.ma.p3.5,Digits),7,"Arial",fib.SR.shadow.6.c);   }

  591. // 6th level (hi.6.p3, lo.6.p3)
  592.    if(lo.ma.p3.6-hi.ma.p3.6>Ask-Bid)   {
  593.       ObjectCreate("lo.6.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.6, t2.p3, lo.ma.p3.6);
  594.       ObjectSet("lo.6.p3",OBJPROP_STYLE,STYLE_SOLID);
  595.       ObjectSet("lo.6.p3",OBJPROP_WIDTH,2);
  596.       ObjectSet("lo.6.p3",OBJPROP_RAY,false);
  597.       ObjectSet("lo.6.p3",OBJPROP_COLOR,fib.SR.shadow.7.c);
  598.       ObjectSetText("lo.6.p3",DoubleToStr(lo.ma.p3.6,Digits),7,"Arial",fib.SR.shadow.7.c);

  599.       ObjectCreate("hi.6.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.6, t2.p3, hi.ma.p3.6);
  600.       ObjectSet("hi.6.p3",OBJPROP_STYLE,STYLE_SOLID);
  601.       ObjectSet("hi.6.p3",OBJPROP_WIDTH,2);
  602.       ObjectSet("hi.6.p3",OBJPROP_RAY,false);
  603.       ObjectSet("hi.6.p3",OBJPROP_COLOR,fib.SR.shadow.7.c);
  604.       ObjectSetText("hi.6.p3",DoubleToStr(hi.ma.p3.6,Digits),7,"Arial",fib.SR.shadow.7.c);   }
  605. //...............Moving Average Support & Resistance Levels..............................
  606.    string space="             ";
  607.       ObjectCreate("ma1.p3",OBJ_TEXT,0,t1.p3,ma1.p3);//13 ma
  608.       ObjectSetText("ma1.p3",space+DoubleToStr(ma1.p3,Digits),8,"Arial",White);

  609.       ObjectCreate("ma2.p3",OBJ_TEXT,0,t1.p3,ma2.p3);//21 ma
  610.       ObjectSetText("ma2.p3",space+DoubleToStr(ma2.p3,Digits),8,"Arial",White);      

  611.       ObjectCreate("ma3.p3",OBJ_TEXT,0,t1.p3,ma3.p3);//34 ma
  612.       if(Bid>ma3.p3) {ObjectSetText("ma3.p3",space+DoubleToStr(ma3.p3,Digits),8,"Arial",LightGreen);}
  613.       if(Ask<ma3.p3) {ObjectSetText("ma3.p3",space+DoubleToStr(ma3.p3,Digits),8,"Arial",Pink);}
  614.       if(Bid<=ma3.p3 && Ask>=ma3.p3)  {
  615.          ObjectSetText("ma3.p3",space+DoubleToStr(ma3.p3,Digits),8,"Arial",Yellow);}

  616.       ObjectCreate("ma4.p3",OBJ_TEXT,0,t1.p3,ma4.p3);//55 ma
  617.       if(Bid>ma4.p3) {ObjectSetText("ma4.p3",space+DoubleToStr(ma4.p3,Digits),8,"Arial",LightGreen);}
  618.       if(Ask<ma4.p3) {ObjectSetText("ma4.p3",space+DoubleToStr(ma4.p3,Digits),8,"Arial",Pink);}
  619.       if(Bid<=ma4.p3 && Ask>=ma4.p3)  {
  620.          ObjectSetText("ma4.p3",space+DoubleToStr(ma4.p3,Digits),8,"Arial",Yellow);}

  621.       ObjectCreate("ma5.p3",OBJ_TEXT,0,t1.p3,ma5.p3);//89 ma
  622.       if(Bid>ma5.p3) {ObjectSetText("ma5.p3",space+DoubleToStr(ma5.p3,Digits),8,"Arial",Green);}
  623.       if(Ask<ma5.p3) {ObjectSetText("ma5.p3",space+DoubleToStr(ma5.p3,Digits),8,"Arial",Red);}
  624.       if(Bid<=ma5.p3 && Ask>=ma5.p3)  {
  625.          ObjectSetText("ma5.p3",space+DoubleToStr(ma5.p3,Digits),8,"Arial",Yellow);}

  626.       ObjectCreate("ma6.p3",OBJ_TEXT,0,t1.p3,NormalizeDouble(ma6.p3,Digits));//144 ma
  627.       if(Bid>ma6.p3) {ObjectSetText("ma6.p3",space+DoubleToStr(ma6.p3,Digits),8,"Arial",Green);}
  628.       if(Ask<ma6.p3) {ObjectSetText("ma6.p3",space+DoubleToStr(ma6.p3,Digits),8,"Arial",Red);}
  629.       if(Bid<=ma6.p3 && Ask>=ma6.p3)  {
  630.          ObjectSetText("ma6.p3",space+DoubleToStr(ma6.p3,Digits),8,"Arial",Yellow);}

  631.       ObjectCreate("ma7.p3",OBJ_TEXT,0,t1.p3,NormalizeDouble(ma7.p3,Digits));//233 ma
  632.       if(Bid>ma7.p3) {ObjectSetText("ma7.p3",space+DoubleToStr(ma7.p3,Digits),8,"Arial",Green);}
  633.       if(Ask<ma7.p3) {ObjectSetText("ma7.p3",space+DoubleToStr(ma7.p3,Digits),8,"Arial",Red);}
  634.       if(Bid<=ma7.p3 && Ask>=ma7.p3)  {
  635.          ObjectSetText("ma7.p3",space+DoubleToStr(ma7.p3,Digits),8,"Arial",Yellow);}
  636. }//end p3.Fib.Plot()

  637. void p4.Fib.Plot()   {
  638. //p4 dynamic fibo levels
  639.    double lo.ma.p4,hi.ma.p4;
  640.    lo.ma.p4=ma1.p4;
  641.    if(ma2.p4<lo.ma.p4)  {lo.ma.p4=ma2.p4;}
  642.    if(ma3.p4<lo.ma.p4)  {lo.ma.p4=ma3.p4;}
  643.    if(ma4.p4<lo.ma.p4)  {lo.ma.p4=ma4.p4;}
  644.    if(ma5.p4<lo.ma.p4)  {lo.ma.p4=ma5.p4;}
  645.    if(ma6.p4<lo.ma.p4)  {lo.ma.p4=ma6.p4;}
  646.    if(ma7.p4<lo.ma.p4)  {lo.ma.p4=ma7.p4;}
  647.    lo.ma.p4=NormalizeDouble(lo.ma.p4+(fib.SR.shadow.1*Point),Digits);

  648.    hi.ma.p4=ma7.p4;
  649.    if(ma6.p4>hi.ma.p4)  {hi.ma.p4=ma6.p4;}
  650.    if(ma5.p4>hi.ma.p4)  {hi.ma.p4=ma5.p4;}
  651.    if(ma4.p4>hi.ma.p4)  {hi.ma.p4=ma4.p4;}
  652.    if(ma3.p4>hi.ma.p4)  {hi.ma.p4=ma3.p4;}
  653.    if(ma2.p4>hi.ma.p4)  {hi.ma.p4=ma2.p4;}
  654.    if(ma1.p4>hi.ma.p4)  {hi.ma.p4=ma1.p4;}
  655.    hi.ma.p4=NormalizeDouble(hi.ma.p4-(fib.SR.shadow.1*Point),Digits);

  656. //p4 center dynamic fib placement      
  657.    if(lo.ma.p4-hi.ma.p4>Ask-Bid)   {
  658.       ObjectCreate("lcf.p4",OBJ_TREND,0,t1.p4, lo.ma.p4, t2.p4, lo.ma.p4);
  659.       ObjectSet("lcf.p4",OBJPROP_STYLE,STYLE_SOLID);
  660.       ObjectSet("lcf.p4",OBJPROP_WIDTH,2);
  661.       ObjectSet("lcf.p4",OBJPROP_RAY,false);
  662.       ObjectSet("lcf.p4",OBJPROP_COLOR,fib.SR.shadow.1.c);
  663.       ObjectSetText("lcf.p4",DoubleToStr(lo.ma.p4,Digits),7,"Arial",fib.SR.shadow.1.c);

  664.       ObjectCreate("hcf.p4",OBJ_TREND,0,t1.p4, hi.ma.p4, t2.p4, hi.ma.p4);
  665.       ObjectSet("hcf.p4",OBJPROP_STYLE,STYLE_SOLID);
  666.       ObjectSet("hcf.p4",OBJPROP_WIDTH,2);
  667.       ObjectSet("hcf.p4",OBJPROP_RAY,false);
  668.       ObjectSet("hcf.p4",OBJPROP_COLOR,fib.SR.shadow.1.c);
  669.       ObjectSetText("hcf.p4",DoubleToStr(hi.ma.p4,Digits),7,"Arial",fib.SR.shadow.1.c);   }      

  670.    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;
  671.    lo.ma.p4.1=lo.ma.p4+(fib.SR.shadow.2*Point);
  672.    lo.ma.p4.2=lo.ma.p4.1+(fib.SR.shadow.3*Point);
  673.    lo.ma.p4.3=lo.ma.p4.2+(fib.SR.shadow.4*Point);
  674.    lo.ma.p4.4=lo.ma.p4.3+(fib.SR.shadow.5*Point);
  675.    lo.ma.p4.5=lo.ma.p4.4+(fib.SR.shadow.6*Point);
  676.    lo.ma.p4.6=lo.ma.p4.5+(fib.SR.shadow.7*Point);
  677.      
  678.    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;
  679.    hi.ma.p4.1=hi.ma.p4-(fib.SR.shadow.2*Point);
  680.    hi.ma.p4.2=hi.ma.p4.1-(fib.SR.shadow.3*Point);
  681.    hi.ma.p4.3=hi.ma.p4.2-(fib.SR.shadow.4*Point);
  682.    hi.ma.p4.4=hi.ma.p4.3-(fib.SR.shadow.5*Point);
  683.    hi.ma.p4.5=hi.ma.p4.4-(fib.SR.shadow.6*Point);
  684.    hi.ma.p4.6=hi.ma.p4.5-(fib.SR.shadow.7*Point);

  685. //p4 1st level (hi.1.p4, lo.1.p4)
  686.    if(lo.ma.p4.1-hi.ma.p4.1>Ask-Bid)   {
  687.       ObjectCreate("lo.1.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.1, t2.p4, lo.ma.p4.1);
  688.       ObjectSet("lo.1.p4",OBJPROP_STYLE,STYLE_SOLID);
  689.       ObjectSet("lo.1.p4",OBJPROP_WIDTH,2);
  690.       ObjectSet("lo.1.p4",OBJPROP_RAY,false);
  691.       ObjectSet("lo.1.p4",OBJPROP_COLOR,fib.SR.shadow.2.c);
  692.       ObjectSetText("lo.1.p4",DoubleToStr(lo.ma.p4.1,Digits),7,"Arial",fib.SR.shadow.2.c);

  693.       ObjectCreate("hi.1.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.1, t2.p4, hi.ma.p4.1);
  694.       ObjectSet("hi.1.p4",OBJPROP_STYLE,STYLE_SOLID);
  695.       ObjectSet("hi.1.p4",OBJPROP_WIDTH,2);
  696.       ObjectSet("hi.1.p4",OBJPROP_RAY,false);
  697.       ObjectSet("hi.1.p4",OBJPROP_COLOR,fib.SR.shadow.2.c);
  698.       ObjectSetText("hi.1.p4",DoubleToStr(hi.ma.p4.1,Digits),7,"Arial",fib.SR.shadow.2.c);   }

  699. // 2st level (hi.2.p4, lo.2.p4)
  700.    if(lo.ma.p4.2-hi.ma.p4.2>Ask-Bid)   {
  701.       ObjectCreate("lo.2.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.2, t2.p4, lo.ma.p4.2);
  702.       ObjectSet("lo.2.p4",OBJPROP_STYLE,STYLE_SOLID);
  703.       ObjectSet("lo.2.p4",OBJPROP_WIDTH,2);
  704.       ObjectSet("lo.2.p4",OBJPROP_RAY,false);
  705.       ObjectSet("lo.2.p4",OBJPROP_COLOR,fib.SR.shadow.3.c);
  706.       ObjectSetText("lo.2.p4",DoubleToStr(lo.ma.p4.2,Digits),7,"Arial",fib.SR.shadow.3.c);

  707.       ObjectCreate("hi.2.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.2, t2.p4, hi.ma.p4.2);
  708.       ObjectSet("hi.2.p4",OBJPROP_STYLE,STYLE_SOLID);
  709.       ObjectSet("hi.2.p4",OBJPROP_WIDTH,2);
  710.       ObjectSet("hi.2.p4",OBJPROP_RAY,false);
  711.       ObjectSet("hi.2.p4",OBJPROP_COLOR,fib.SR.shadow.3.c);
  712.       ObjectSetText("hi.2.p4",DoubleToStr(hi.ma.p4.2,Digits),7,"Arial",fib.SR.shadow.3.c);   }     

  713. // 3rd level (hi.3.p4, lo.3.p4)
  714.    if(lo.ma.p4.3-hi.ma.p4.3>Ask-Bid)   {
  715.       ObjectCreate("lo.3.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.3, t2.p4, lo.ma.p4.3);
  716.       ObjectSet("lo.3.p4",OBJPROP_STYLE,STYLE_SOLID);
  717.       ObjectSet("lo.3.p4",OBJPROP_WIDTH,2);
  718.       ObjectSet("lo.3.p4",OBJPROP_RAY,false);
  719.       ObjectSet("lo.3.p4",OBJPROP_COLOR,fib.SR.shadow.4.c);
  720.       ObjectSetText("lo.3.p4",DoubleToStr(lo.ma.p4.3,Digits),7,"Arial",fib.SR.shadow.4.c);

  721.       ObjectCreate("hi.3.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.3, t2.p4, hi.ma.p4.3);
  722.       ObjectSet("hi.3.p4",OBJPROP_STYLE,STYLE_SOLID);
  723.       ObjectSet("hi.3.p4",OBJPROP_WIDTH,2);
  724.       ObjectSet("hi.3.p4",OBJPROP_RAY,false);
  725.       ObjectSet("hi.3.p4",OBJPROP_COLOR,fib.SR.shadow.4.c);
  726.       ObjectSetText("hi.3.p4",DoubleToStr(hi.ma.p4.3,Digits),7,"Arial",fib.SR.shadow.4.c);   }   

  727. // 4th level (hi.4.p4, lo.4.p4)
  728.    if(lo.ma.p4.4-hi.ma.p4.4>Ask-Bid)   {
  729.       ObjectCreate("lo.4.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.4, t2.p4, lo.ma.p4.4);
  730.       ObjectSet("lo.4.p4",OBJPROP_STYLE,STYLE_SOLID);
  731.       ObjectSet("lo.4.p4",OBJPROP_WIDTH,2);
  732.       ObjectSet("lo.4.p4",OBJPROP_RAY,false);
  733.       ObjectSet("lo.4.p4",OBJPROP_COLOR,fib.SR.shadow.5.c);
  734.       ObjectSetText("lo.4.p4",DoubleToStr(lo.ma.p4.4,Digits),7,"Arial",fib.SR.shadow.5.c);

  735.       ObjectCreate("hi.4.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.4, t2.p4, hi.ma.p4.4);
  736.       ObjectSet("hi.4.p4",OBJPROP_STYLE,STYLE_SOLID);
  737.       ObjectSet("hi.4.p4",OBJPROP_WIDTH,2);
  738.       ObjectSet("hi.4.p4",OBJPROP_RAY,false);
  739.       ObjectSet("hi.4.p4",OBJPROP_COLOR,fib.SR.shadow.5.c);
  740.       ObjectSetText("hi.4.p4",DoubleToStr(hi.ma.p4.4,Digits),7,"Arial",fib.SR.shadow.5.c);   }

  741. // 5th level (hi.5.p4, lo.5.p4)
  742.    if(lo.ma.p4.5-hi.ma.p4.5>Ask-Bid)   {
  743.       ObjectCreate("lo.5.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.5, t2.p4, lo.ma.p4.5);
  744.       ObjectSet("lo.5.p4",OBJPROP_STYLE,STYLE_SOLID);
  745.       ObjectSet("lo.5.p4",OBJPROP_WIDTH,2);
  746.       ObjectSet("lo.5.p4",OBJPROP_RAY,false);
  747.       ObjectSet("lo.5.p4",OBJPROP_COLOR,fib.SR.shadow.6.c);
  748.       ObjectSetText("lo.5.p4",DoubleToStr(lo.ma.p4.5,Digits),7,"Arial",fib.SR.shadow.6.c);

  749.       ObjectCreate("hi.5.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.5, t2.p4, hi.ma.p4.5);
  750.       ObjectSet("hi.5.p4",OBJPROP_STYLE,STYLE_SOLID);
  751.       ObjectSet("hi.5.p4",OBJPROP_WIDTH,2);
  752.       ObjectSet("hi.5.p4",OBJPROP_RAY,false);
  753.       ObjectSet("hi.5.p4",OBJPROP_COLOR,fib.SR.shadow.6.c);
  754.       ObjectSetText("hi.5.p4",DoubleToStr(hi.ma.p4.5,Digits),7,"Arial",fib.SR.shadow.6.c);   }

  755. // 6th level (hi.6.p4, lo.6.p4)
  756.    if(lo.ma.p4.6-hi.ma.p4.6>Ask-Bid)   {
  757.       ObjectCreate("lo.6.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.6, t2.p4, lo.ma.p4.6);
  758.       ObjectSet("lo.6.p4",OBJPROP_STYLE,STYLE_SOLID);
  759.       ObjectSet("lo.6.p4",OBJPROP_WIDTH,2);
  760.       ObjectSet("lo.6.p4",OBJPROP_RAY,false);
  761.       ObjectSet("lo.6.p4",OBJPROP_COLOR,fib.SR.shadow.7.c);
  762.       ObjectSetText("lo.6.p4",DoubleToStr(lo.ma.p4.6,Digits),7,"Arial",fib.SR.shadow.7.c);

  763.       ObjectCreate("hi.6.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.6, t2.p4, hi.ma.p4.6);
  764.       ObjectSet("hi.6.p4",OBJPROP_STYLE,STYLE_SOLID);
  765.       ObjectSet("hi.6.p4",OBJPROP_WIDTH,2);
  766.       ObjectSet("hi.6.p4",OBJPROP_RAY,false);
  767.       ObjectSet("hi.6.p4",OBJPROP_COLOR,fib.SR.shadow.7.c);
  768.       ObjectSetText("hi.6.p4",DoubleToStr(hi.ma.p4.6,Digits),7,"Arial",fib.SR.shadow.7.c);   }
  769. //...............Moving Average Support & Resistance Levels..............................
  770.    string space="             ";
  771.       ObjectCreate("ma1.p4",OBJ_TEXT,0,t1.p4,ma1.p4);//13 ma
  772.       ObjectSetText("ma1.p4",space+DoubleToStr(ma1.p4,Digits),8,"Arial",White);

  773.       ObjectCreate("ma2.p4",OBJ_TEXT,0,t1.p4,ma2.p4);//21 ma
  774.       ObjectSetText("ma2.p4",space+DoubleToStr(ma2.p4,Digits),8,"Arial",White);      

  775.       ObjectCreate("ma3.p4",OBJ_TEXT,0,t1.p4,ma3.p4);//34 ma
  776.       if(Bid>ma3.p4) {ObjectSetText("ma3.p4",space+DoubleToStr(ma3.p4,Digits),8,"Arial",LightGreen);}
  777.       if(Ask<ma3.p4) {ObjectSetText("ma3.p4",space+DoubleToStr(ma3.p4,Digits),8,"Arial",Pink);}
  778.       if(Bid<=ma3.p4 && Ask>=ma3.p4)  {
  779.          ObjectSetText("ma3.p4",space+DoubleToStr(ma3.p4,Digits),8,"Arial",Yellow);}

  780.       ObjectCreate("ma4.p4",OBJ_TEXT,0,t1.p4,ma4.p4);//55 ma
  781.       if(Bid>ma4.p4) {ObjectSetText("ma4.p4",space+DoubleToStr(ma4.p4,Digits),8,"Arial",LightGreen);}
  782.       if(Ask<ma4.p4) {ObjectSetText("ma4.p4",space+DoubleToStr(ma4.p4,Digits),8,"Arial",Pink);}
  783.       if(Bid<=ma4.p4 && Ask>=ma4.p4)  {
  784.          ObjectSetText("ma4.p4",space+DoubleToStr(ma4.p4,Digits),8,"Arial",Yellow);}

  785.       ObjectCreate("ma5.p4",OBJ_TEXT,0,t1.p4,ma5.p4);//89 ma
  786.       if(Bid>ma5.p4) {ObjectSetText("ma5.p4",space+DoubleToStr(ma5.p4,Digits),8,"Arial",Green);}
  787.       if(Ask<ma5.p4) {ObjectSetText("ma5.p4",space+DoubleToStr(ma5.p4,Digits),8,"Arial",Red);}
  788.       if(Bid<=ma5.p4 && Ask>=ma5.p4)  {
  789.          ObjectSetText("ma5.p4",space+DoubleToStr(ma5.p4,Digits),8,"Arial",Yellow);}

  790.       ObjectCreate("ma6.p4",OBJ_TEXT,0,t1.p4,NormalizeDouble(ma6.p4,Digits));//144 ma
  791.       if(Bid>ma6.p4) {ObjectSetText("ma6.p4",space+DoubleToStr(ma6.p4,Digits),8,"Arial",Green);}
  792.       if(Ask<ma6.p4) {ObjectSetText("ma6.p4",space+DoubleToStr(ma6.p4,Digits),8,"Arial",Red);}
  793.       if(Bid<=ma6.p4 && Ask>=ma6.p4)  {
  794.          ObjectSetText("ma6.p4",space+DoubleToStr(ma6.p4,Digits),8,"Arial",Yellow);}

  795.       ObjectCreate("ma7.p4",OBJ_TEXT,0,t1.p4,NormalizeDouble(ma7.p4,Digits));//233 ma
  796.       if(Bid>ma7.p4) {ObjectSetText("ma7.p4",space+DoubleToStr(ma7.p4,Digits),8,"Arial",Green);}
  797.       if(Ask<ma7.p4) {ObjectSetText("ma7.p4",space+DoubleToStr(ma7.p4,Digits),8,"Arial",Red);}
  798.       if(Bid<=ma7.p4 && Ask>=ma7.p4)  {
  799.          ObjectSetText("ma7.p4",space+DoubleToStr(ma7.p4,Digits),8,"Arial",Yellow);}
  800. }//end p4.Fib.Plot()
  801. void column()  {
  802. //..................Time Frame Columns.................................................     
  803.       string down, up;down=+Bid; up=+Ask;

  804.          ObjectCreate(p1.ma+"m "+down,OBJ_RECTANGLE,0,t1.p1,Bid,t2.p1,0);
  805.          ObjectSet(p1.ma+"m "+down,OBJPROP_COLOR,Red);
  806.          ObjectCreate(p1.ma+"m "+up,OBJ_RECTANGLE,0,t1.p1,Ask,t2.p1,Ask*1.5);
  807.          ObjectSet(p1.ma+"m "+up,OBJPROP_COLOR,Green);

  808.          ObjectCreate(p2.ma+"m "+down,OBJ_RECTANGLE,0,t1.p2,0,t2.p2,Bid);
  809.          ObjectSet(p2.ma+"m "+down,OBJPROP_COLOR,Red);
  810.          ObjectCreate(p2.ma+"m "+up,OBJ_RECTANGLE,0,t1.p2,Ask,t2.p2,Ask*1.5);
  811.          ObjectSet(p2.ma+"m "+up,OBJPROP_COLOR,Green);

  812.          ObjectCreate(p3.ma+"m "+down,OBJ_RECTANGLE,0,t1.p3,Bid,t2.p3,0);
  813.          ObjectSet(p3.ma+"m "+down,OBJPROP_COLOR,Red);
  814.          ObjectCreate(p3.ma+"m "+up,OBJ_RECTANGLE,0,t1.p3,Ask,t2.p3,Ask*1.5);
  815.          ObjectSet(p3.ma+"m "+up,OBJPROP_COLOR,Green);

  816.          ObjectCreate(p4.ma+"m "+down,OBJ_RECTANGLE,0,t1.p4,Bid,t2.p4,0);
  817.          ObjectSet(p4.ma+"m "+down,OBJPROP_COLOR,Red);
  818.          ObjectCreate(p4.ma+"m "+up,OBJ_RECTANGLE,0,t1.p4,Ask,t2.p4,Ask*1.5);
  819.          ObjectSet(p4.ma+"m "+up,OBJPROP_COLOR,Green);}//end column();
  820. //---- done
复制代码


回复

使用道具 举报

468

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81342
发表于 2019-4-29 13:05:55 | 显示全部楼层
哎天理何在啊??
回复 支持 反对

使用道具 举报

243

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81684
发表于 2019-4-29 13:05:55 | 显示全部楼层
我对生命无悔,奈何心中有愧,只要不死……誓将RMB一赚到底!
回复 支持 反对

使用道具 举报

248

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81580
发表于 2019-4-29 13:06:10 | 显示全部楼层
错过一个人最可怕的方式就是:坐在她的身旁,你却知道永远都不会拥有她。
回复 支持 反对

使用道具 举报

190

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
80726
发表于 2019-4-29 13:06:14 | 显示全部楼层
人本是人,无需刻意去做人。
回复 支持 反对

使用道具 举报

198

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81730
发表于 2019-4-29 13:06:18 | 显示全部楼层
天冷了,大家都注意啊!
回复 支持 反对

使用道具 举报

215

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81395
发表于 2019-4-29 13:06:35 | 显示全部楼层
欲望以提升热忱,毅力以磨平高山。
回复 支持 反对

使用道具 举报

发表于 2019-4-29 13:06:39 | 显示全部楼层
标记
回复 支持 反对

使用道具 举报

230

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81005
发表于 2019-4-29 13:06:51 | 显示全部楼层
楼上的稍等啦
回复 支持 反对

使用道具 举报

469

主题

5万

帖子

8万

积分

高级VIP会员

Rank: 8Rank: 8

积分
81435
发表于 2019-4-29 13:07:03 | 显示全部楼层
“紧吗?”“不紧!”“可以再进去一点吗?”“小心一点,应该可以!”“痛吗?”“不痛!感觉真爽!就买这双吧。
回复 支持 反对

使用道具 举报

QQ|Archiver|手机版|小黑屋|努金智能 ( 沪ICP备18033831号-1 )

GMT+8, 2019-10-16 10:25 , Processed in 0.051065 second(s), 25 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表