量化团队将不定期的公布一些经典技术指标改版或者源码公式
江恩线原理设计的主图源码
这是一个趋势转换主图指标,不重绘
全部源码获取方式:
加入我们的知识星球获取
部分源码展示
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); }
领取专属 10元无门槛券
私享最新 技术干货