[MT4指标]DayChannel指标
主图指标
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//|                                                   DayChannel.mq4 |
//|                                                       妙  仂咫? |
//|                                           http://www.system32.ru |
//+------------------------------------------------------------------+
#property copyright \"妙  仂咫?\"
#property link      \"http://www.system32.ru\"
//----
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_color3 Blue
//----
double shifthigh;
double shiftlow;
double shiftaver;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   SetIndexStyle(0,DRAW_LINE, 0,2);
   SetIndexBuffer(0,shifthigh);
   SetIndexLabel(0,\"Up Channel\");
   SetIndexDrawBegin(0,0);
   SetIndexStyle(1,DRAW_LINE, 0,2);
   SetIndexBuffer(1,shiftlow);
   SetIndexLabel(1,\"Down Channel\");
   SetIndexDrawBegin(1,0);
   SetIndexStyle(2,DRAW_LINE, 0,2);
   SetIndexBuffer(2,shiftaver);
   SetIndexLabel(2,\"Average Channel\");
   SetIndexDrawBegin(2,0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
 int deinit()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int i;
   double LowLine=0;
   double HighLine=0;
   double AverLine=0;
//---- 
   int ww=0;
   for(i=(Bars-1);i>0;i--)
     {
      if (((TimeHour(Time)== 23) && (TimeMinute(Time) < 59))
         || ((TimeDayOfWeek(Time)== 5) && (TimeHour(Time)== 22) && (TimeMinute(Time) < 59)))
         ww=0;
      if (TimeHour(Time)== 0 && TimeMinute(Time)>=0 && TimeMinute(Time)<=30 && ww==0)
        {
         LowLine=iLow(Symbol(),NULL,i);
         HighLine=iHigh(Symbol(),NULL,i);
         ww=1;
        }
      else
        {
         if (iLow(Symbol(),NULL,i)  < LowLine)   LowLine=iLow(Symbol(),NULL,i);
         if (iHigh(Symbol(),NULL,i) > HighLine) HighLine=iHigh(Symbol(),NULL,i);
        }
      AverLine=LowLine+(HighLine-LowLine)/2;
//----
      shiftlow=LowLine;
      shifthigh=HighLine;
      shiftaver=AverLine;
     }
   Comment(\" 锗? - \", HighLine,\";   祟? - \",LowLine, \";   难 - \",AverLine,\";   罔痂磬 赅磬豚=\",(HighLine-LowLine)*(1/Point));
//----
   return(0);
  }
//+------------------------------------------------------------------+
发表于:2015-08-03 01:13只看该作者
2楼 
沙发,看看先。
韬客社区www.talkfx.co
发表于:2015-08-04 04:55只看该作者
3楼 
支持的顶下
韬客社区www.talkfx.co
发表于:2015-09-02 12:03只看该作者
4楼 
因为比较贵,所以没舍得买
发表于:2015-10-29 07:17只看该作者
5楼 
謝謝
韬客社区www.talkfx.co
发表于:2015-11-09 07:21只看该作者
6楼 
支持的顶下支持的顶下支持的顶下
韬客社区www.talkfx.co
发表于:2016-12-13 07:18只看该作者
8楼 
看看先
韬客社区www.talkfx.co
发表于:2017-08-08 06:39只看该作者
9楼 
谢谢分享
韬客社区www.talkfx.co



























