指标程序编写求助
mt4吧
全部回复
仅看楼主
level 1
if(InpBackstep>=InpDepth||rates_total<InpDepth)
return(0);
int i=0;
int limit;
int Z_Time=0;
int Z_Price=0;
limit=rates_total-prev_calculated;
if(prev_calculated>0) limit++;
for(i=0;i<limit;i++)
{
if(zigzagzhi(i)>0)
{
zigzag[Z_Time][Z_Price]=i;
Z_Price++;
zigzag[Z_Time][Z_Price]=zigzagzhi(i);
if(Z_Time>=2)
{
double X=zigzag[Z_Time][Z_Price];
Z_Time--;
double Y=zigzag[Z_Time][Z_Price];
Z_Time--;
double Z=zigzag[Z_Time][Z_Price];
double bili=NormalizeDouble((X-Y)/(Y-Z)*100,2);
Z_Time=Z_Time+2;
ObjectCreate("0","bili",OBJ_TEXT,0,zigzag[Z_Time][0],zigzag[Z_Time][1]+50*Point);
ObjectSetText("0",DoubleToString(bili,2),10,"宋体",clrBlue);
}
Z_Time++;
Z_Price--;
ExtZigzagBuffer[i]=zigzagzhi(i);
}
}
return(rates_total);
这个内容主要是想在ZIGZAG的高低点上标记涨跌比例,但是实际运行不显示,
请贴吧大神帮我看看这个程序有什么错误
2024年05月30日 20点05分 1
1