当前位置:首页>行情>一个精准抓行情反转,超买超卖一键信号的指标源码分享

一个精准抓行情反转,超买超卖一键信号的指标源码分享

  • 2026-10-30 06:53:04
一个精准抓行情反转,超买超卖一键信号的指标源码分享
大家好,我是浪哥!
怎么感觉端午节之前的时间过的飞快呢,果然是无限接近幸福的适合最幸福。浪哥已经迫不及待过端午了,你们呢准备端午去哪里玩评论区说一下。浪哥一开心就会给大家分享好玩的ea,今天也不例外。
很多老手都知道,原生CCI就是一根单线曲线,杂乱看不清,行情来回扫的时候,根本分不清什么时候行情超买、什么时候行情超卖,反转拐点完全抓不住。
但是我今天分享的这款改良版CCI,直接把单线改成了多空分区直方图,一眼就能看懂盘面强弱:零轴上方蓝色柱子,代表多头强势;零轴下方红色柱子,代表空头占优,多空分界一目了然,新手看一眼就能分清盘面方向。
而且它自带200数值的极限阈值线,专门抓极致超买超卖反转行情。我给大家讲清楚信号怎么用:
当CCI从下方极限位直接上穿回归常态,盘面自动打出蓝色向上箭头,就是稳健做多信号;当CCI从上方极限位下穿回落,盘面自动打出红色向下箭头,就是明确做空信号。
重点来了,这款指标最实用的三个硬核亮点:
第一,自带四重报警功能,盘面弹窗提醒、邮件提醒、手机推送提醒全部配齐,不用一直盯盘,信号出来手机直接响,解放你的双眼;
第二,优化了底层源码计算,不会卡顿、不会延迟,哪怕你用1分钟、5分钟小周期刷单,指标运行丝滑不卡顿,没有任何未来函数,信号不漂移、不重绘,历史信号固定不变,复盘百分百真实;
第三,自动清理盘面箭头,卸载指标之后盘面干干净净,不会残留杂乱线条,不影响你正常看盘。
好了,如果有不懂得记得来私信浪哥:waihuipai
源码我放下面了,需要的自取一下:
#property indicator_separate_window#property indicator_buffers 3#property indicator_color1 Red#property indicator_width1 2#property indicator_color2 RoyalBlue#property indicator_width2 2#property indicator_level1    0.0#property indicator_levelcolor clrSilver#property indicator_levelstyle STYLE_DOT//---- input parametersextern int      CCIperiod =  21;extern int      CCIprice  =  5;extern int      HotLevel  =  200;extern color      LevelColor  =  clrSilver;ENUM_LINE_STYLE LevelStyle =  STYLE_DOT;extern int         LevelSize  =  0;extern int       num_bars=5000;// parametersbool initDone=true;int bar=0;int prevbars=0;int startpar=0;int cs=0;int prevcs=0;string commodt="nonono";int frame=0;int bars=0;int count = 0, thisbar = 0;double now, prev;bool flag;//---- buffersdouble HistoCCI[];double HistoRed[];double HistoBlue[];//+ www.expforex.com edit AlertArrow +  extern string Alerts="Алерты и стрелки от www.expforex.com";  extern bool AlerT=true;  // Выдавать алерт на экран            extern bool Mail=false;   // Посылать сообщение           extern bool Push=false;   // Посылать ПУШ на телефон  extern bool Arrow=true;  // Ставить стрелки на сигналах  extern color clrBUY  =  clrBlue,                  clrSELL  =  clrRed;  extern int   CodBUY  =  233,               CodSELL  =  234;                extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом  extern int intPoint = 50;// Отступ стрелки   int timeee;              // Внутренняя переменная  string nameInd;voidSetArrow(int cd, color cl,              string nm="", datetime t1=0, double p1=0, int sz=1)  {  if (nm=="") nm=DoubleToStr(Time[0], 0);  if (t1<=0) t1=Time[0];  if (p1<=0) p1=Bid;  nameInd=WindowExpertName( );int wind=WindowFind(nameInd);wind=0;  if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_ARROW, wind, 0,0);  ObjectSet(nm, OBJPROP_TIME1    , t1);  ObjectSet(nm, OBJPROP_PRICE1   , p1);  ObjectSet(nm, OBJPROP_ARROWCODE, cd);  ObjectSet(nm, OBJPROP_COLOR    , cl);  ObjectSet(nm, OBJPROP_WIDTH    , sz);}voidExpforex_AlertArrow(string text="",int arrowdir=0,bool history=false,int i=0)  {   nameInd=WindowExpertName();   int wind=WindowFind(nameInd);   if(wind==-1)wind=0;   if(!history)     {      if(AlerT) Alert(text);      if(Arrow) if(arrowdir==1) SetArrow(CodBUY,clrBUY,nameInd+DoubleToStr(Time[shift],0),Time[shift],(Low[shift]-intPoint*Point));      if(Arrow) if(arrowdir==2) SetArrow(CodSELL,clrSELL,nameInd+DoubleToStr(Time[shift],0),Time[shift],(High[shift]+intPoint*Point));      if(!IsTesting())if(Mail) SendMail(text,text);      if(!IsTesting())if(Push) SendNotification(text);     }   if(history)     {      if(Arrow) if(arrowdir==1) SetArrow(CodBUY,clrBUY,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],(Low[shift+i]-intPoint*Point));      if(Arrow) if(arrowdir==2) SetArrow(CodSELL,clrSELL,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],(High[shift+i]+intPoint*Point));     }  }voidOnDeinit(constint reason)  {   for(int i=ObjectsTotal();i>=0;i--)     {      if(StringFind(ObjectName(i),nameInd)!=-1)         ObjectDelete(ObjectName(i));     }  }//+ www.expforex.com edit AlertArrow +  //+------------------------------------------------------------------+//+------------------------------------------------------------------+//| Custom indicator initialization function                         |//+------------------------------------------------------------------+intinit()  {//---- indicators   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID);   SetIndexBuffer(0,HistoCCI);   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID);   SetIndexBuffer(1,HistoRed);   SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID);   SetIndexBuffer(2,HistoBlue);   SetLevelValue(0,HotLevel);   SetLevelValue(1,-HotLevel);   SetLevelStyle(LevelStyle,LevelSize,LevelColor);    IndicatorShortName("CCI Histogram ("+CCIperiod+")");//----   return(0);  }//+------------------------------------------------------------------+//| Custom indicator iteration function                              |//+------------------------------------------------------------------+intstart()  {   int i,counted_bars=IndicatorCounted();   cs = CCIperiod  + num_bars; //checksum used to see if parameters have been changed   if ((cs==prevcs) && (commodt == Symbol()) &&       (frame == (Time[4] - Time[5])) &&      ((Bars - prevbars) < 2))      startpar = Bars - prevbars;    else       startpar = -1;  //params haven't changed only need to calculate new bar   commodt = Symbol();   frame= Time[4] - Time[5];   prevbars = Bars;   prevcs = cs;   if (startpar == 1 || startpar == 0)        bar = startpar;   else       initDone = true;   if (initDone) {      HistoCCI[num_bars-1]=0;      HistoBlue[num_bars-1]=0;      HistoRed[num_bars-1]=0;      bar=num_bars-2;      initDone=false;   }   for (i = bar; i >= 0; i--) {      HistoCCI[i]=iCCI(NULL,0,CCIperiod,CCIprice,i);      now = iCCI(NULL,0,CCIperiod,CCIprice,i);      if ((prev >= 0 && now < 0) || (prev < 0 && now >= 0)) { // change of sign detected         flag = true;         count = 0;      }      // Colour it!      if (now > 0)      HistoBlue[i] = now;      if (now < 0)      HistoRed[i] = now;      prev = now;   }   //+==+//+ www.expforex.com edit AlertArrow +//+==+ nameInd=WindowExpertName( );          if(timeee!=Time[0] &&  HistoCCI[shift+1]<= -HotLevel && HistoCCI[shift]> -HotLevel  )               {                 Expforex_AlertArrow(Symbol()+" "+PeriodString()+"  "+nameInd+" Up",1);                    timeee=Time[0];                          }           if(timeee!=Time[0]   &&  HistoCCI[shift+1]>=HotLevel && HistoCCI[shift]<HotLevel  )               {                 Expforex_AlertArrow(Symbol()+" "+PeriodString()+"  "+nameInd+" Dn",2);                    timeee=Time[0];                          }//+==+     if(counted_bars>0) counted_bars--;   int limit2=Bars-counted_bars;   for(int i2=0; i2<limit2; i2++)     { nameInd=WindowExpertName( );          if(    HistoCCI[shift+1+i2]<= -HotLevel && HistoCCI[shift+i2]> -HotLevel  )               {                 Expforex_AlertArrow(Symbol()+" "+PeriodString()+"  "+nameInd+" Up",1,true,i2);                     }           if(    HistoCCI[shift+1+i2]>=HotLevel && HistoCCI[shift+i2]<HotLevel  )               {                 Expforex_AlertArrow(Symbol()+" "+PeriodString()+"  "+nameInd+" Dn",2,true,i2);                    }}//+ www.expforex.com edit AlertArrow +       return(0);  }//+------------------------------------------------------------------+//| Period String                                                    |//+------------------------------------------------------------------+stringPeriodString()  {    switch (_Period)      {        case PERIOD_M1:  return("M1");        case PERIOD_M5:  return("M5");        case PERIOD_M15: return("M15");        case PERIOD_M30: return("M30");        case PERIOD_H1:  return("H1");        case PERIOD_H4:  return("H4");        case PERIOD_D1:  return("D1");        case PERIOD_W1:  return("W1");        case PERIOD_MN1: return("MN1");        default: return("M"+(string)_Period);     }      return("M"+(string)_Period);   }   由于时间有限加上对源码的追溯做不到最终解释权,所以我们提供的源码EA仅仅只能用来做模拟测试使用,严格禁止商业使用和跑实盘!//+------------------------------------------------------------------+

最新文章

随机文章