比特币通信协议 - 币圈消息

比特币通信协议篇11、二、TURN简介。在典型的情况下,TURN客户端连接到内网中,并且通过一个或者多个NAT到 详细

求助大神,**代码意思

[复制链接]
223 0
花开富贵 发表于 2018-1-11 11:45:35 | 只看该作者 |阅读模式 打印 上一主题 下一主题
mt4平台,代码如下:问题是:1,digit值看起来是作为修正用的,默认是0,请问大神,这个digit到底有什么用?
还有,
当标的K线开线价格满足什么条件时,出现箭头提示买卖点。
而又当价格运行到什么价位时,买卖点失效(关掉mt4再次进入则箭头消失,否则箭头是不会消失的)
比如k线开线提示了买点,随后价格下行,到一定价位,买点失效,周期切换后再切换回来,买点箭头消失。(一般情况下,右键刷新应该也可以,但这个指标不行,右键刷新无用,必须切换周期或者重启mt4)
多谢!!
#property indicator_buffers 7
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 Aqua
#property indicator_color4 Yellow
#property indicator_color5 Green
#property indicator_color6 Red
#property indicator_color7 Red
//---- Indicateurs
double EMA18, EMA28, WMA5, WMA8, tuncross;
double EMA18Current, EMA18Previous, EMA28Current, EMA28Previous;
double WMA5Current, WMA5Previous, WMA8Current, WMA8Previous;
extern double digit=0;
int    nShift;
//---- buffers
double ExtMapBuffer1[];    //EMA18
double ExtMapBuffer2[];    //EMA28
double ExtMapBuffer3[];    //WMA5
double ExtMapBuffer4[];    //WMA8
double ExtMapBuffer5[];    //Fleche Haut
double ExtMapBuffer6[];    //Fleche Bas
double ExtMapBuffer7[];    //Croix
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//---- Styles et couleur des Lignes
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexStyle(3,DRAW_LINE);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexStyle(3,DRAW_LINE);
//---- Styles et couleur des Fleches      
   SetIndexStyle(4, DRAW_ARROW, 0, 1);    // Fleche vers le haut
   SetIndexArrow(4, 233);
   SetIndexBuffer(4, ExtMapBuffer5);
   SetIndexStyle(5, DRAW_ARROW, 0, 1);    // Fleche vers le bas
   SetIndexArrow(5, 234);
   SetIndexBuffer(5, ExtMapBuffer6);
   SetIndexStyle(6, DRAW_ARROW, 0, 1);    // Croix rouge fin de trade
   SetIndexArrow(6, 251);
   SetIndexBuffer(6, ExtMapBuffer7);
//----      
   switch(Period())
     {
      case     1: nShift=1;   break;
      case     5: nShift=3;   break;
      case    15: nShift=5;   break;
      case    30: nShift=10;  break;
      case    60: nShift=15;  break;
      case   240: nShift=20;  break;
      case  1440: nShift=80;  break;
      case 10080: nShift=100; break;
      case 43200: nShift=200; break;
     }
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    i,j,limit,counted_bars=IndicatorCounted();
//----
   if(counted_bars0)
      counted_bars--;
//----      
   limit=Bars-counted_bars;
//----
   for(i=0; i EMA28Current + digit*Point) &&( EMA18Previous  WMA8Current && WMA5Previous  EMA28Current + digit*Point) &&( EMA18Previous  WMA8Current + digit*Point) &&( WMA5Previous  EMA18Current+ digit*Point) && ( WMA5Previous  EMA28Current+ digit*Point) && ( WMA5Previous  EMA18Current+ digit*Point) && ( WMA8Previous  EMA28Current+ digit*Point) && ( WMA8Previous  WMA8Current+  digit*Point )&&(WMA5Previous EMA28Current+ digit*Point) &&(WMA8Previous WMA5Current && WMA8Previous = EMA28Previous)) &&   // Croisement Tunnel
                  //((WMA5Current = WMA8Previous)) &&       // Croisement WMA
                  //((WMA5Current  WMA5Current+  digit*Point )&&(WMA8Previous WMA8Current+ digit*Point) &&(WMA8Previous>=EMA28Current))  // Croisement WMA8  down bord inf閞ieur du tunnel
        {
         ExtMapBuffer6[i]=High[i] + nShift*Point;
        }         /*}*/
     }
//---- Dessin des croix, future sortie en trade
   return(0);
收藏
收藏0
转播
转播
分享
分享
分享
淘帖0
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题
阅读排行更多+

Powered by 顺水鱼MT4外汇EA网! X3.2© 2001-2017 顺水MT4外汇EA公司.( 陕ICP备17014341号-1