首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

江恩线原理设计的主图源码

量化团队将不定期的公布一些经典技术指标改版或者源码公式

江恩线原理设计的主图源码

这是一个趋势转换主图指标,不重绘

全部源码获取方式:

加入我们的知识星球获取

部分源码展示

int init(){IndicatorBuffers(3);  SetIndexBuffer(0,hi); SetIndexStyle(0,DRAW_HISTOGRAM);  SetIndexBuffer(1,lo); SetIndexStyle(1,DRAW_HISTOGRAM);  SetIndexBuffer(2,Hlv);

   //    //    //    //    //

   indicatorFileName = WindowExpertName();    calculateValue    = (TimeFrame=="calculateValue"); if (calculateValue) return(0);    returnBars        = (TimeFrame=="returnBars");     if (returnBars)     return(0);    timeFrame         = stringToTimeFrame(TimeFrame);

   //    //    //    //    //

 IndicatorShortName(timeFrameToString(timeFrame)+"  Gann on jurik HiLo activator bars");return(0);}

//////////

int deinit(){  return(0); }

//////+------------------------------------------------------------------+//|                                                                  |//+------------------------------------------------------------------+

int start(){  int counted_bars=IndicatorCounted();  int i,limit;

 if(counted_bars<0) return(-1);  if(counted_bars>0) counted_bars--;          limit = MathMin(Bars - counted_bars,Bars-1);          if (returnBars)  { hi[0] = limit+1; return(0); }

 //  //  //  //  //

 if (calculateValue || timeFrame == Period())  {

     for(i=limit;i>=0;i--)      {

     Hlv[i] = Hlv[i+1];        if(Close[i] > iDSmooth(iMA(Symbol(),0,1,0,MODE_SMA,PRICE_HIGH,i+1),Length,Phase,Double,i+1, 0)) Hlv[i] =  1;        if(Close[i] < iDSmooth(iMA(Symbol(),0,1,0,MODE_SMA,PRICE_LOW, i+1),Length,Phase,Double,i+1,20)) Hlv[i] = -1;

       if(Hlv[i] == -1)             { lo[i] = High[i]; hi[i] = Low[i]; }        else { hi[i] = High[i]; lo[i] = Low[i]; }  }  manageAlerts();  return(0);  }

  • 发表于:
  • 原文链接https://page.om.qq.com/page/O72EHnA24LHX5DIb0VC0Yl-g0
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券