请各位E文好的或会编程的进来一下
我各人很喜欢ZigZag这个指标,但这个指标用起来不是很好用,想请各位帮忙把ZigZag代码的英文给翻译一下(只翻译红色部分就行了)。
//+------------------------------------------------------------------+
//| Custom Moving Average.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 White
//---- indicator parameters
extern int ExtDepth=13;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
//---- indicator buffers
double ExtMapBuffer;
double ExtMapBuffer2;
//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(2); //---- drawing settings SetIndexStyle(0,DRAW_SECTION); //---- indicator buffers mapping SetIndexBuffer(0,ExtMapBuffer); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(0,0.0); ArraySetAsSeries(ExtMapBuffer,true); ArraySetAsSeries(ExtMapBuffer2,true); //---- indicator short name IndicatorShortName("ZigZagFirstBar("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")"); //---- initialization done return(0);
} //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ [color=Red]int start() { int shift, back,lasthighpos,lastlowpos; double val,res; double curlow,curhigh,lasthigh,lastlow; for(shift=Bars-ExtDepth; shift>=0; shift--) { val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)]; if(val==lastlow) val=0.0; else { lastlow=val; if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0; else { for(back=1; back<=ExtBackstep; back++) { res=ExtMapBuffer[shift+back]; if((res!=0)&&(res>val)) continue;//ExtMapBuffer[shift+back]=0.0; } } } ExtMapBuffer[shift]=val; //--- high val=High[Highest(NULL,0,MODE_HIGH,ExtDepth,shift)]; if(val==lasthigh) val=0.0; else { lasthigh=val; if((val-High[shift])>(ExtDeviation*Point)) val=0.0; else { for(back=1; back<=ExtBackstep; back++) { res=ExtMapBuffer2[shift+back]; if((res!=0)&&(res=0; shift--)
{
curlow=ExtMapBuffer[shift];
curhigh=ExtMapBuffer2[shift];
// if((curlow==0.0)||(curhigh==0.0)) continue;
//---
if(curhigh!=0)
{
if(lasthigh>0)
{
if(lasthigh
//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(2); //---- drawing settings SetIndexStyle(0,DRAW_SECTION); //---- indicator buffers mapping SetIndexBuffer(0,ExtMapBuffer); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(0,0.0); ArraySetAsSeries(ExtMapBuffer,true); ArraySetAsSeries(ExtMapBuffer2,true); //---- indicator short name IndicatorShortName("ZigZagFirstBar("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")"); //---- initialization done return(0);
} //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ [color=Red]int start() { int shift, back,lasthighpos,lastlowpos; double val,res; double curlow,curhigh,lasthigh,lastlow; for(shift=Bars-ExtDepth; shift>=0; shift--) { val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)]; if(val==lastlow) val=0.0; else { lastlow=val; if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0; else { for(back=1; back<=ExtBackstep; back++) { res=ExtMapBuffer[shift+back]; if((res!=0)&&(res>val)) continue;//ExtMapBuffer[shift+back]=0.0; } } } ExtMapBuffer[shift]=val; //--- high val=High[Highest(NULL,0,MODE_HIGH,ExtDepth,shift)]; if(val==lasthigh) val=0.0; else { lasthigh=val; if((val-High[shift])>(ExtDeviation*Point)) val=0.0; else { for(back=1; back<=ExtBackstep; back++) { res=ExtMapBuffer2[shift+back]; if((res!=0)&&(res
发表于:2006-01-05 05:45只看该作者
2楼
印象当中 我在国内的飞弧上就用过
他是一个含有未来函数的指标
不要很相信那个
遇到矛盾 先站在对方的立场上想想问题,先试着去理解别人
● 如何使用WinMTR查询平台连接流畅度