|
在老毛子论坛里看到了刚刚更新了最新版蝴蝶指标ZUP_V148,今天马上到这里提供大家分享,见附件:
ZUP _V148.rar
(1.08 MB, 下载次数: 825, 售价: 5 金钱)
版本信息如下:
主要参数设置如下:
除去安德鲁斯线如下:
右上角显示各种蝴蝶形态名称如下:
隔壁的如果要偷去转发的人,告诉你在里面已添加了这个网站的链接了,谢谢你免费推广了这里。哈哈。
czigzag代码:
- //+------------------------------------------------------------------+
- //| CZigZag.mq4 |
- //| Copyright ?2006, Candid |
- //| [email]likh@yandex.ru[/email] |
- //+------------------------------------------------------------------+
- #property copyright "Copyright ?2006, Candid"
- #property link "likh@yandex.ru"
- #property indicator_chart_window
- #property indicator_buffers 1
- #property indicator_color1 Navy
- //---- indicator parameters
- extern int ExtDepth=12;
- extern int ExtDeviation=5;
- //extern int ExtBackstep=3;
- int shift;
- double res=0;
- int i;
- double CurMax,CurMin;
- int CurMaxPos,CurMinPos;
- int CurMaxBar,CurMinBar;
- double hPoint;
- double mhPoint;
- double EDev;
- int MaxDist,MinDist;
- bool FirstRun;
- bool AfterMax,AfterMin;
- int BarTime;
- //---- indicator buffers
- double ZigZag[];
- //+------------------------------------------------------------------+
- //| Custom indicator initialization function |
- //+------------------------------------------------------------------+
- int init() {
- //---- indicators
- SetIndexStyle(0,DRAW_SECTION);
- //---- indicator buffers mapping
- SetIndexBuffer(0,ZigZag);
- SetIndexEmptyValue(0,0.0);
- //---- indicator short name
- IndicatorShortName("ZigZag("+ExtDepth+","+ExtDeviation+")");
- FirstRun = true;
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator deinitialization function |
- //+------------------------------------------------------------------+
- int deinit() {
- //----
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator iteration function |
- //+------------------------------------------------------------------+
- int start() {
- int counted_bars=IndicatorCounted();
- int fBar;
- if (FirstRun) {
- hPoint = 0.5*Point;
- mhPoint = -hPoint;
- EDev = (ExtDeviation+0.5)*Point;
- AfterMax = true;
- AfterMin = true;
- fBar = Bars-1;
- CurMax = High[fBar];
- CurMaxBar = 1;
- CurMin = Low[fBar];
- CurMinBar = 1;
- MaxDist = 0;
- MinDist = 0;
- BarTime = 0;
- FirstRun = false;
- }
- //----
- fBar = Bars-counted_bars-1;
- if (fBar > Bars-2) fBar = Bars-2;
- for(shift=fBar; shift>=0; shift--) {
- if (BarTime!=Time[shift]) {
- BarTime=Time[shift];
- if (res > hPoint ) {
- MaxDist = Bars-CurMaxBar-shift+1;
- MinDist = Bars-CurMinBar-shift+1;
- if ((MaxDist>ExtDepth && MinDist>ExtDepth) || res > EDev) {
- if (AfterMax) {
- AfterMax = false;
- AfterMin = true;
- CurMaxBar = CurMinBar+1;
- CurMaxPos = Bars-CurMaxBar;
- CurMax = High[CurMaxPos];
- for (i=CurMaxPos-1;i>=shift;i--) {
- if (High[i] > CurMax+hPoint) {
- CurMaxBar = Bars-i;
- CurMax = High[i];
- }
- } // for (i=CurMaxPos-1;i>=shift;i--)
- ZigZag[Bars-CurMaxBar] = CurMax;
- } else { // if (AfterMax)
- AfterMin = false;
- AfterMax = true;
- CurMinBar = CurMaxBar+1;
- CurMinPos = Bars-CurMinBar;
- CurMin = Low[CurMinPos];
- for (i=CurMinPos-1;i>=shift;i--) {
- if (Low[i] < CurMin-hPoint) {
- CurMinBar = Bars-i;
- CurMin = Low[i];
- }
- } // for (i=CurMinPos-1;i>=shift;i--)
- ZigZag[Bars-CurMinBar] = CurMin;
- } // else if (AfterMax)
- } // if ((MaxDist>ExtDepth && MinDist>ExtDepth) || res > EDev)
- } // if (res > hPoint )
- } // if (BarTime!=Time[0])
- if (AfterMax) {
- res = Low[shift]-CurMin;
- if (res < mhPoint) {
- ZigZag[Bars-CurMinBar] = 0;
- CurMin = Low[shift];
- CurMinBar = Bars-shift;
- ZigZag[Bars-CurMinBar] = CurMin;
- } // if (res < mhPoint)
- } // if (AfterMax)
- if (AfterMin) {
- res = CurMax-High[shift];
- if (res < mhPoint) {
- ZigZag[Bars-CurMaxBar] = 0;
- CurMax = High[shift];
- CurMaxBar = Bars-shift;
- ZigZag[Bars-CurMaxBar] = CurMax;
- } // if (res < mhPoint)
- } // if (AfterMin)
- } // for(shift=fBar; shift>=0; shift--)
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
复制代码
DT-ZZ-NEN代码:
- //+------------------------------------------------------------------+
- //| DT_ZZ_nen.mq4 |
- //| 填滂翳鲨痤忄?nen 11-1-2007 |
- //+------------------------------------------------------------------+
- #property copyright "Copyright ?2006, klot."
- #property link "klot@mail.ru"
- #property link "http://onix-trade.net/forum/index.php?s=&showtopic=4786&view=findpost&p=273797"
- #property indicator_chart_window
- #property indicator_buffers 3
- #property indicator_color1 Aqua
- #property indicator_color2 Blue
- #property indicator_color3 Red
- #property indicator_width2 2
- #property indicator_width3 2
- //---- indicator parameters
- extern int ExtDepth=12;
- extern int ExtLabel=0;
- //---- indicator buffers
- double zzL[];
- double zzH[];
- double zz[];
- //+------------------------------------------------------------------+
- //| Custom indicator initialization function |
- //+------------------------------------------------------------------+
- int init()
- {
- // IndicatorBuffers(3);
- //---- drawing settings
- SetIndexStyle(0,DRAW_SECTION);
- SetIndexStyle(1,DRAW_ARROW);
- SetIndexStyle(2,DRAW_ARROW);
- SetIndexArrow(1,159);
- SetIndexArrow(2,159);
- //---- indicator buffers mapping
- SetIndexBuffer(0,zz);
- SetIndexBuffer(1,zzH);
- SetIndexBuffer(2,zzL);
- SetIndexEmptyValue(0,0.0);
- SetIndexEmptyValue(1,0.0);
- SetIndexEmptyValue(2,0.0);
- //---- indicator short name
- IndicatorShortName("DT_ZZ("+ExtDepth+")");
- //---- initialization done
- return(0);
- }
- //+------------------------------------------------------------------+
- //| |
- //+------------------------------------------------------------------+
- int start()
- {
- int i,shift,pos,lasthighpos,lastlowpos,curhighpos,curlowpos;
- double curlow,curhigh,lasthigh,lastlow;
- double min, max;
- ArrayInitialize(zz,0.0);
- ArrayInitialize(zzL,0.0);
- ArrayInitialize(zzH,0.0);
- lasthighpos=Bars; lastlowpos=Bars;
- lastlow=Low[Bars];lasthigh=High[Bars];
- for(shift=Bars-ExtDepth; shift>=0; shift--)
- {
- curlowpos=Lowest(NULL,0,MODE_LOW,ExtDepth,shift);
- curlow=Low[curlowpos];
- curhighpos=Highest(NULL,0,MODE_HIGH,ExtDepth,shift);
- curhigh=High[curhighpos];
- //------------------------------------------------
- if( curlow>=lastlow ) { lastlow=curlow; }
- else
- {
- //桎屐 忭桤
- if( lasthighpos>curlowpos )
- {
- zzL[curlowpos]=curlow;
- ///*
- min=100000; pos=lasthighpos;
- for(i=lasthighpos; i>=curlowpos; i--)
- {
- if (zzL[i]==0.0) continue;
- if (zzL[i]<min) { min=zzL[i]; pos=i; }
- zz[i]=0.0;
- }
- zz[pos]=min;
- //*/
- }
- lastlowpos=curlowpos;
- lastlow=curlow;
- }
- //--- high
- if( curhigh<=lasthigh ) { lasthigh=curhigh;}
- else
- {
- // 桎屐 忖屦?
- if( lastlowpos>curhighpos )
- {
- zzH[curhighpos]=curhigh;
- ///*
- max=-100000; pos=lastlowpos;
- for(i=lastlowpos; i>=curhighpos; i--)
- {
- if (zzH[i]==0.0) continue;
- if (zzH[i]>max) { max=zzH[i]; pos=i; }
- zz[i]=0.0;
- }
- zz[pos]=max;
- //*/
- }
- lasthighpos=curhighpos;
- lasthigh=curhigh;
- }
- //----------------------------------------------------------------------
- }
- if (ExtLabel>0) Metka();
- return(0);
- }
- //+------------------------------------------------------------------+
- //--------------------------------------------------------
- // 朽耨蜞眍怅?戾蝾? 袜鬣腩.
- //--------------------------------------------------------
- void Metka()
- {
- int metka=0; // =0 - 漕 镥疴钽?镥疱腩爨 ZZ. =1 - 棂屐 戾蜿?爨犟桁箪钼. =2 - 棂屐 戾蜿?扈龛祗祛?
- for(int shift=Bars-ExtDepth; shift>=0; shift--)
- {
- if (zz[shift]>0)
- {
- if (zzH[shift]>0)
- {
- metka=2; zzL[shift]=0; shift--;
- }
- else
- {
- metka=1; zzH[shift]=0; shift--;
- }
- }
- if (metka==0)
- {
- zzH[shift]=0; zzL[shift]=0;
- }
- else if (metka==1)
- {
- if (zzH[shift]>0) metka=0;
- zzL[shift]=0;
- }
- else if (metka==2)
- {
- if (zzL[shift]>0) metka=0;
- zzH[shift]=0;
- }
- }
- }
复制代码
|
评分
-
查看全部评分
|