5评论

0收藏

japan-indicator

avatar 360 | 1028 人阅读 | 5 人评论 | 2018-03-08

EURGBPH1.png

  1. //+------------------------------------------------------------------+
  2. //|                                                   Japan.mq4 |
  3. //|                                                     Yuriy Tokman |
  4. //|                                            yuriytokman@gmail.com |
  5. //+------------------------------------------------------------------+
  6. #property copyright "Yuriy Tokman"
  7. #property link      "yuriytokman@gmail.com"

  8. #property indicator_chart_window
  9. //---- input parameters
  10. extern int       barsToProcess=1000;

  11. //+------------------------------------------------------------------+
  12. //| Custom indicator initialization function                         |
  13. //+------------------------------------------------------------------+
  14. int init()
  15.   {
  16. //---- indicators
  17. //----
  18.    return(0);
  19.   }
  20. //+------------------------------------------------------------------+
  21. //| Custom indicator deinitialization function                       |
  22. //+------------------------------------------------------------------+
  23. int deinit()
  24.   {
  25. //----
  26. int i;
  27.   
  28.   
  29.   
  30.   for (i=0;i<Bars;i++)
  31.     {
  32.     ObjectDelete("项忮眄 桦?祛腩?"+DoubleToStr(i,0));
  33.     ObjectDelete("猁鼽?镱汶铢屙桢 "+DoubleToStr(i,0));
  34.     ObjectDelete("戾溻彐 镱汶铢屙桢 "+DoubleToStr(i,0));
  35.     ObjectDelete("玎忮襦 桤 蝈祉 钺豚觐?"+DoubleToStr(i,0));
  36.     ObjectDelete("镳铖忮??钺豚赅?"+DoubleToStr(i,0));
  37.     ObjectDelete("漕滏 "+DoubleToStr(i,0));
  38.     }
  39. //----
  40.    return(0);
  41.   }
  42. //+------------------------------------------------------------------+
  43. //| Custom indicator iteration function                              |
  44. //+------------------------------------------------------------------+
  45. int start()
  46.   {
  47.    int    counted_bars=IndicatorCounted(),
  48. //----
  49.    limit,
  50.    i=0;
  51.    if(counted_bars>0)
  52.       counted_bars--;
  53.    
  54.    limit=Bars-counted_bars;
  55.    
  56.    if(limit>barsToProcess)
  57.       limit=barsToProcess;

  58.    while (i<limit)
  59.    {           
  60.                                  //项忮眄 桦?祛腩?
  61.       double k = (High[i]-Low[i])/3;
  62.       if ((Open[i]>(Low[i]+2*k))&&(Close[i]>(Low[i]+2*k)))
  63.        {
  64.         ObjectCreate("项忮眄 桦?祛腩?"+DoubleToStr(i,0),OBJ_ARROW,0,Time[i],High[i]+10*Point);
  65.         ObjectSet("项忮眄 桦?祛腩?"+DoubleToStr(i,0),OBJPROP_ARROWCODE,108);
  66.         ObjectSet("项忮眄 桦?祛腩?"+DoubleToStr(i,0),OBJPROP_COLOR,DimGray);
  67.        }            
  68.                                 //猁鼽?镱汶铢屙桢
  69.       if((Open[i+1]>Close[i+1])&&(Close[i+1]>Open[i])&&(Close[i]>Open[i+1]))
  70.        {
  71.         ObjectCreate("猁鼽?镱汶铢屙桢 "+DoubleToStr(i,0),OBJ_ARROW,0,Time[i],Low[i]-15*Point);
  72.         ObjectSet("猁鼽?镱汶铢屙桢 "+DoubleToStr(i,0),OBJPROP_ARROWCODE,110);
  73.        }            
  74.                                //戾溻彐 镱汶铢屙桢
  75.        if((Close[i+1]>Open[i+1])&&(Open[i]>Close[i+1])&&(Open[i+1]>Close[i]))
  76.        {
  77.         ObjectCreate("戾溻彐 镱汶铢屙桢 "+DoubleToStr(i,0),OBJ_ARROW,0,Time[i],High[i]+15*Point);
  78.         ObjectSet("戾溻彐 镱汶铢屙桢 "+DoubleToStr(i,0),OBJPROP_ARROWCODE,110);
  79.         ObjectSet("戾溻彐 镱汶铢屙桢 "+DoubleToStr(i,0),OBJPROP_COLOR,Lime);
  80.        }
  81.                                //玎忮襦 桤 蝈祉 钺豚觐?
  82.        if((Open[i+1]<Close[i+1])&&(Open[i]>High[i+1])&&(Close[i]<(Open[i+1]+(Close[i+1]-Open[i+1])/2)))
  83.        {
  84.         ObjectCreate("玎忮襦 桤 蝈祉 钺豚觐?"+DoubleToStr(i,0),OBJ_ARROW,0,Time[i],High[i]+25*Point);
  85.         ObjectSet("玎忮襦 桤 蝈祉 钺豚觐?"+DoubleToStr(i,0),OBJPROP_ARROWCODE,116);
  86.         ObjectSet("玎忮襦 桤 蝈祉 钺豚觐?"+DoubleToStr(i,0),OBJPROP_COLOR,Lime);
  87.        }
  88.                                //镳铖忮??钺豚赅?
  89.        if((Open[i+1]>Close[i+1])&&(Low[i+1]>Open[i])&&(Close[i]>(Close[i+1]+(Open[i+1]-Close[i+1])/2)))
  90.        {
  91.         ObjectCreate("镳铖忮??钺豚赅?"+DoubleToStr(i,0),OBJ_ARROW,0,Time[i],Low[i]-25*Point);
  92.         ObjectSet("镳铖忮??钺豚赅?"+DoubleToStr(i,0),OBJPROP_ARROWCODE,116);
  93.        }
  94.                                //漕滏
  95.        if(Open[i]==Close[i])
  96.        {
  97.         ObjectCreate("漕滏 "+DoubleToStr(i,0),OBJ_ARROW,0,Time[i],High[i]+30*Point);
  98.         ObjectSet("漕滏 "+DoubleToStr(i,0),OBJPROP_ARROWCODE,174);
  99.         ObjectSet("漕滏 "+DoubleToStr(i,0),OBJPROP_COLOR,Indigo);
  100.        }
  101.      i++;  
  102.    }

  103. //----
  104.    return(0);
  105.   }
复制代码


japan-indicator.mq4
""
还没有人打赏,支持一下

评论|共 5 个

我是大哥

发表于 2020-7-8 18:50:11 来自手机 | 显示全部楼层

学习技术交流

淘金俏佳人

发表于 2020-8-22 10:00:50 | 显示全部楼层

帮你顶下哈!!

coahb

发表于 2020-9-10 15:30:22 | 显示全部楼层

谢谢楼主分享

ustbz

发表于 2020-11-20 17:01:03 | 显示全部楼层

佳佳

发表于 2021-8-1 21:41:53 | 显示全部楼层

您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则