缠学-线段指标的创新(MQL4)(4)

2019-04-22 13:56

BeforePrice = LeftPrice; } LastTowards = LineTowards; LeftPrice = RightPrice; LeftShift = RightShift; i = LastArraySeat; } //---- return(0); } //+------------------------------------------------------------------+ int GetElectricity( int nY_Shift ) { //---- int nY_Number,nY_Pos,nY_NewPos,nY_Type; double nY_High,nY_Low,nY_Up,nY_Dn; //---- nY_Pos = nY_Shift-1; LastArraySeat = nY_Pos; LineTowards = Stroke[nY_Pos][0]; nY_High = Stroke[nY_Pos][1]; nY_Low = Stroke[nY_Pos][2]; RightShift = Stroke[nY_Pos][3]; //●笔触及超高压,代码1 if( (nY_High-nY_Low)>=(1+Delta)*HighVoltage ) { if( LineTowards>0 ) { RightPrice = nY_High; } else { RightPrice = nY_Low; } return(1); } //●非首柱笔触及高压线 if( nY_Shift<(TotalStroke-2) && (nY_High-nY_Low)>=HighVoltage ) { //且创新高或新低,绝对值为1 if( (LastTowards<0 && nY_High>BeforePrice) || (LastTowards>0 && nY_Low0 ) { RightPrice = nY_High; } else { RightPrice = nY_Low; } return(1); } } //●笔成Z字形 if( LineTowards>0 ) { nY_Up = nY_High; nY_Dn = LeftPrice; } else { nY_Up = LeftPrice; nY_Dn = nY_Low; } //-- nY_Pos--; nY_NewPos = nY_Pos; nY_Type = 0; nY_Number = 0; while( nY_NewPos>=0 ) { if( Stroke[nY_NewPos][1]>nY_Up ) { nY_Type = 1; break; } if( Stroke[nY_NewPos][2]0 ) { RightPrice = Stroke[nY_NewPos][1]; //正向电还是反向电 if( LastTowards>0 ) { nY_Number = 2; } else { nY_Number = 3; } } else { RightPrice = Stroke[nY_NewPos][2]; //正向电还是反向电 if( LastTowards>0 ) { nY_Number = 3; } else { nY_Number = 2; } } //---- return(nY_Number); } //+------------------------------------------------------------------+ void W_2DotDrawZigZag( int nY_x1, int nY_x2, double nY_y1, double nY_y2, double& nY_ZigArray[] ) { //---- nY_ZigArray[nY_x1] = nY_y1; nY_ZigArray[nY_x2] = nY_y2; //---- for( int Y_Shift=nY_x2-1; Y_Shift>nY_x1; Y_Shift--) { nY_ZigArray[Y_Shift] = 0.0; } //---- return; } //+------------------------------------------------------------------+


缠学-线段指标的创新(MQL4)(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2017年广州市海珠区江南外国语学校八年级(下)期中英语试题(答案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: