COCO研究院

 找回密碼
 註冊
搜索
查看: 31184|回復: 10

又來找人幫忙了

[複製鏈接]
發表於 16-9-29 15:18 | 顯示全部樓層 |閱讀模式
本帖最後由 生猛海鮮 於 16-9-29 15:32 編輯

在網路上找到有mt4寫好的免費波浪指標,但都是大陸網站的,所以我不會用,請問有人可以幫忙下載到這邊的嗎.讓我可以下載來使用。我用目前所有的coco幣來換可以嗎?感恩。

http://www.programtrader.net/bbs/read.php?tid=24202

http://www.doc88.com/p-086372254846.html

http://www.docin.com/p-70994060.html



 樓主| 發表於 16-10-3 20:01 | 顯示全部樓層
MarkHsu 發表於 16-10-1 22:39
我盡力。看版大喜歡什麼顏色自己調。

十二萬分的感謝您


回復 支持 1 反對 0

使用道具 舉報

發表於 16-10-1 07:20 | 顯示全部樓層
路過就順手複製了一下,不知道是不是版主要的東西。也測了一下,ZigZag指標?

ICWR.zip

16.2 KB, 下載次數: 4

售價: 1 金錢  [記錄]

我只是複製貼上而已

評分

參與人數 1金錢 +5 收起 理由
manhavecoco + 5 按一個讚 ^^

查看全部評分

回復 支持 1 反對 0

使用道具 舉報

 樓主| 發表於 16-9-29 15:46 | 顯示全部樓層

<>//| ICWR indicator |
//| Copyright ?2010, John Lotoski |
//| www.programtrader.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005,www.programtrader.net"
#property link www.programtrader.net
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Blue

<>//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
extern int RequiredWaveHeight=40;

<>//---- 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("ICWR("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");

<>//---- initialization done
return(0);
}

<>//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+

<>int deinit() // Removes all lines and text
{ // from the chart upon removal
// of the indicator
ObjectDelete("ActiveWave");
ObjectDelete("Fibo");
return(0);
}

<>//+------------------------------------------------------------------+
//| Main function |
//+------------------------------------------------------------------+
int start()
{
int shift,back,lasthighpos,lastlowpos,LastActivePos;
double val,res;
double curlow,curhigh,lasthigh,lastlow,LastActive;

<>int AWStartPos, AWEndPos;
double AWStart, AWEnd;

<>double FiboL, FiboH, FiboLC, FiboLR, FiboHR, FiboHC;

<>for(shift=Bars-ExtDepth; shift>=0; shift--)
{
// The beginning code of this for loop is dedicated
// to finding a low endpoint of a zig-zag
val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)];
// Start at beginning of data
// - Get low of last depth (12) periods
// - Repeat low search of 12 periods,
// advancing 1 bar every search (for loop)

<>if(val==lastlow) // If this is not a new low
val=0.0; // - Reset the val marker to dbl 0

<>else // Otherwise, if it is a new low
{
lastlow=val; // - Record this new low in lastlow for future reference
if((Low[shift]-val)>(ExtDeviation*Point))
val=0.0; // If the low of the current bar is 6 or
// more pips greater than the lowest low of the last
// depth (12) periods, then reset val to dbl 0.
// Ie: continue the zig because the line is going up

<>else // Otherwise, if the current low is within 6 pips
{ // of the lowest low of the last 12 bars
for(back=1; back<=ExtBackstep; back++)
{ // Check back 3 bars, and if each value over those
// three bars is greater than the current lowest low,
// then reset the map buffer value to 0 because
// we have a new lower low.
res=ExtMapBuffer[shift+back];
if((res!=0)&&(res>val))
ExtMapBuffer[shift+back]=0.0;
}
}
}

<>ExtMapBuffer[shift]=val; // Set our current bar to 0 (continuation of zig) if:
// - A new low has not been reached;
// - The current bar is 6 pips beyond the lowest low
// Set our current bar to the lowest low if:
// - It is within 6 pips of the lowest low and
// and go back over the last three bars and set them
// to continuation of zig as well if they are greater
// than the new lowest value

<>
// Same deal for below, except the case is reversed
// and everything is done in terms of trying to find
// the high zig-zag endpoint
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
ExtMapBuffer2[shift+back]=0.0;
}
}
}
ExtMapBuffer2[shift]=val;
}

<>// final cutting
lasthigh=-1;
lasthighpos=-1;
lastlow=-1;
lastlowpos=-1;

<>for(shift=Bars-ExtDepth; shift>=0; shift--)
{
curlow=ExtMapBuffer[shift];
curhigh=ExtMapBuffer2[shift];

<>if((curlow==0)&&(curhigh==0)) // Break into the next cycle of the loop
continue; // to try and find the next zig-zap endpoint

<>if(curhigh!=0) // If there is a current high, then:
{
if(lasthigh>0) // If there was a previous high already:
{
if(lasthigh
ExtMapBuffer2[lasthighpos]=0;
else // - Set the current bar to 0 if it is less than the last high
ExtMapBuffer2[shift]=0;
}

<>if(lasthigh<0)
{ // If there was no last high or the last high was less than the current high
lasthigh=curhigh; // - Set the current high to be the last high (keep record of it)
lasthighpos=shift; // - Set the current bar to the lasthighpos (keep record of it)
}
lastlow=-1; // Since we just had a new high, reset the lastlow flag
}

<>if(curlow!=0) // If there is a low, then do the same as above, except for the case of lows instead of highs
{
if(lastlow>0)
{
if(lastlow>curlow)
ExtMapBuffer[lastlowpos]=0;
else
ExtMapBuffer[shift]=0;
}

<>if((curlow<0))
{
lastlow=curlow;
lastlowpos=shift;
}
lasthigh=-1;
}
}

<>for(shift=Bars-1; shift>=0; shift--)
{ // Go through all the bars
if(shift>=Bars-ExtDepth) // If we are not at the beginning comparison bars,
ExtMapBuffer[shift]=0.0; // then set the low buffer to 0
else
{ // Otherwise:
res=ExtMapBuffer2[shift]; // - If the current bar has a high, set the low
if(res!=0.0) // buffer to contain the high
ExtMapBuffer[shift]=res;
} // Looks like this function brings the highs into the lows
} // so that all the zig-zags can be drawn from one function

<>LastActive = -1;
LastActivePos = -1;

<>for(shift=0; shift<=Bars-ExtDepth; shift++)
{
if(ExtMapBuffer[shift]!=0.0)
{
if(LastActive > 0)
{
if(MathAbs(LastActive - ExtMapBuffer[shift]) >= RequiredWaveHeight*Point)
{
AWStartPos = shift;
AWStart = ExtMapBuffer[shift];
AWEndPos = LastActivePos;
AWEnd = LastActive;

<>if(ObjectFind("ActiveWave") != 0)
{
ObjectCreate("ActiveWave", OBJ_TREND, 0, Time[AWStartPos], AWStart, Time[AWEndPos], AWEnd);
ObjectSet("ActiveWave", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("ActiveWave", OBJPROP_COLOR, Red);
ObjectSet("ActiveWave", OBJPROP_WIDTH, 3);
ObjectSet("ActiveWave", OBJPROP_RAY, false);
}
else
{
ObjectMove("ActiveWave", 0, Time[AWStartPos], AWStart);
ObjectMove("ActiveWave", 1, Time[AWEndPos], AWEnd);
}

<>if(AWStart < AWEnd)
{
FiboL = AWStart;
FiboH = AWEnd;
}
else
{
FiboL = AWEnd;
FiboH = AWStart;
}

<>FiboLC = FiboL + (FiboH - FiboL)*0.25;
FiboLR = FiboL + (FiboH - FiboL)*0.382;
FiboHR = FiboL + (FiboH - FiboL)*0.618;
FiboHC = FiboL + (FiboH - FiboL)*0.75;

<>
if(ObjectFind("Fibo") != 0)
{
ObjectCreate("Fibo", OBJ_FIBO, 0, Time[AWStartPos], AWStart, Time[AWEndPos], AWEnd);
ObjectSet("Fibo", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("Fibo", OBJPROP_COLOR, Green);
ObjectSet("Fibo", OBJPROP_WIDTH, 2);
ObjectSet("Fibo", OBJPROP_FIBOLEVELS, 6);
/* ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+0, FiboL);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+1, FiboLC);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+2, FiboLR);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+3, FiboHR);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+4, FiboHC);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+6, FiboH); */

<>ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+0, 0);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+1, 0.25);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+2, 0.382);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+3, 0.618);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+4, 0.75);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+5, 1);
}
else
{
ObjectMove("Fibo", 0, Time[AWStartPos], AWStart);
ObjectMove("Fibo", 1, Time[AWEndPos], AWEnd);
}
break;
}
}
LastActive = ExtMapBuffer[shift];
LastActivePos = shift;
}
}
}



請問以上有人可以幫忙把它變成檔案來下載使用嗎,我不會轉成MQ也不會編譯,能把它搞成現成的文件格式好嗎,我下載後加到MT4裡會的.
發表於 16-9-29 16:06 | 顯示全部樓層
海鮮大  那個美少女大 好像會 問他會快很多

祝福

有人懂 MT4 MT5 請出來幫忙 海鮮大 一下囉

評分

參與人數 2金錢 +6 收起 理由
tinyding + 1 按一個讚
生猛海鮮 + 5 按一個讚

查看全部評分

 樓主| 發表於 16-9-29 16:09 | 顯示全部樓層
//| ICWR indicator |
//| Copyright ?2005, John Lotoski |
//| mailto:john@fayandjohn.com |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, john@fayandjohn.com"
#property link "mailto:john@fayandjohn.com" #property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Blue
//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
extern int RequiredWaveHeight=40;
//---- 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("ICWR("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit() // Removes all lines and text
{ // from the chart upon removal
// of the indicator
ObjectDelete("ActiveWave");
ObjectDelete("Fibo");
return(0);
}
//+------------------------------------------------------------------+
//| Main function |
//+------------------------------------------------------------------+
int start()
{
int shift,back,lasthighpos,lastlowpos,LastActivePos;
double val,res;
double curlow,curhigh,lasthigh,lastlow,LastActive;
int AWStartPos, AWEndPos;
double AWStart, AWEnd;
double FiboL, FiboH, FiboLC, FiboLR, FiboHR, FiboHC;
for(shift=Bars-ExtDepth; shift>=0; shift--)
{
// The beginning code of this for loop is dedicated
// to finding a low endpoint of a zig-zag
val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)];
// Start at beginning of data
// - Get low of last depth (12) periods
// - Repeat low search of 12 periods,
// advancing 1 bar every search (for loop)
if(val==lastlow) // If this is not a new low
val=0.0; // - Reset the val marker to dbl 0
else // Otherwise, if it is a new low
{  
lastlow=val; // - Record this new low in lastlow for future reference
if((Low[shift]-val)>(ExtDeviation*Point))  
val=0.0; // If the low of the current bar is 6 or
// more pips greater than the lowest low of the last
// depth (12) periods, then reset val to dbl 0.
// Ie: continue the zig because the line is going up
else // Otherwise, if the current low is within 6 pips
{ // of the lowest low of the last 12 bars
for(back=1; back<=ExtBackstep; back++)
{ // Check back 3 bars, and if each value over those
// three bars is greater than the current lowest low,
// then reset the map buffer value to 0 because
// we have a new lower low.
res=ExtMapBuffer[shift+back];
if((res!=0)&&(res>val))  
ExtMapBuffer[shift+back]=0.0;  
}
}
}  
ExtMapBuffer[shift]=val; // Set our current bar to 0 (continuation of zig) if:
// - A new low has not been reached;
// - The current bar is 6 pips beyond the lowest low
// Set our current bar to the lowest low if:
// - It is within 6 pips of the lowest low and
// and go back over the last three bars and set them
// to continuation of zig as well if they are greater
// than the new lowest value

// Same deal for below, except the case is reversed
// and everything is done in terms of trying to find
// the high zig-zag endpoint
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<val))  
ExtMapBuffer2[shift+back]=0.0;  
}  
}
}
ExtMapBuffer2[shift]=val;
}
// final cutting  
lasthigh=-1;  
lasthighpos=-1;
lastlow=-1;  
lastlowpos=-1;
for(shift=Bars-ExtDepth; shift>=0; shift--)
{
curlow=ExtMapBuffer[shift];
curhigh=ExtMapBuffer2[shift];
if((curlow==0)&&(curhigh==0)) // Break into the next cycle of the loop
continue; // to try and find the next zig-zap endpoint
if(curhigh!=0) // If there is a current high, then:
{
if(lasthigh>0) // If there was a previous high already:
{
if(lasthigh<curhigh) // - Set the last high to 0 if it is less than the current high
ExtMapBuffer2[lasthighpos]=0;
else // - Set the current bar to 0 if it is less than the last high
ExtMapBuffer2[shift]=0;
}
if(lasthigh<curhigh || lasthigh<0)
{ // If there was no last high or the last high was less than the current high
lasthigh=curhigh; // - Set the current high to be the last high (keep record of it)
lasthighpos=shift; // - Set the current bar to the lasthighpos (keep record of it)
}
lastlow=-1; // Since we just had a new high, reset the lastlow flag
}
if(curlow!=0) // If there is a low, then do the same as above, except for the case
of lows instead of highs
{
if(lastlow>0)
{
if(lastlow>curlow)  
ExtMapBuffer[lastlowpos]=0;
else  
ExtMapBuffer[shift]=0;
}
if((curlow<lastlow)||(lastlow<0))
{
lastlow=curlow;
lastlowpos=shift;
}  
lasthigh=-1;
}
}
for(shift=Bars-1; shift>=0; shift--)
{ // Go through all the bars
if(shift>=Bars-ExtDepth) // If we are not at the beginning comparison bars,
ExtMapBuffer[shift]=0.0; // then set the low buffer to 0
else
{ // Otherwise:
res=ExtMapBuffer2[shift]; // - If the current bar has a high, set the low
if(res!=0.0) // buffer to contain the high
ExtMapBuffer[shift]=res;
} // Looks like this function brings the highs into the lows
} // so that all the zig-zags can be drawn from one function
LastActive = -1;
LastActivePos = -1;
for(shift=0; shift<=Bars-ExtDepth; shift++)
{
if(ExtMapBuffer[shift]!=0.0)
{
if(LastActive > 0)
{
if(MathAbs(LastActive - ExtMapBuffer[shift]) >= RequiredWaveHeight*Point)
{
AWStartPos = shift;
AWStart = ExtMapBuffer[shift];
AWEndPos = LastActivePos;
AWEnd = LastActive;
if(ObjectFind("ActiveWave") != 0)
{
ObjectCreate("ActiveWave", OBJ_TREND, 0, Time[AWStartPos], AWStart, Time[AWEndPos],
AWEnd);
ObjectSet("ActiveWave", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("ActiveWave", OBJPROP_COLOR, Red);  
ObjectSet("ActiveWave", OBJPROP_WIDTH, 3);
ObjectSet("ActiveWave", OBJPROP_RAY, false);  
}
else
{
ObjectMove("ActiveWave", 0, Time[AWStartPos], AWStart);
ObjectMove("ActiveWave", 1, Time[AWEndPos], AWEnd);
}
if(AWStart < AWEnd)
{
FiboL = AWStart;
FiboH = AWEnd;
}
else
{
FiboL = AWEnd;
FiboH = AWStart;
}
FiboLC = FiboL + (FiboH - FiboL)*0.25;
FiboLR = FiboL + (FiboH - FiboL)*0.382;
FiboHR = FiboL + (FiboH - FiboL)*0.618;
FiboHC = FiboL + (FiboH - FiboL)*0.75;
if(ObjectFind("Fibo") != 0)
{
ObjectCreate("Fibo", OBJ_FIBO, 0, Time[AWStartPos], AWStart, Time[AWEndPos],
AWEnd);
ObjectSet("Fibo", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("Fibo", OBJPROP_COLOR, Green);  
ObjectSet("Fibo", OBJPROP_WIDTH, 2);
ObjectSet("Fibo", OBJPROP_FIBOLEVELS, 6);
/* ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+0, FiboL);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+1, FiboLC);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+2, FiboLR);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+3, FiboHR);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+4, FiboHC);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+6, FiboH); */
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+0, 0);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+1, 0.25);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+2, 0.382);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+3, 0.618);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+4, 0.75);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+5, 1);
}
else
{
ObjectMove("Fibo", 0, Time[AWStartPos], AWStart);
ObjectMove("Fibo", 1, Time[AWEndPos], AWEnd);
}
break;
}
}
LastActive = ExtMapBuffer[shift];
LastActivePos = shift;
}
}
}
 樓主| 發表於 16-9-29 16:13 | 顯示全部樓層
//| ICWR indicator |
//| Copyright ?2005, John Lotoski |
//| mailto:john@fayandjohn.com |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, john@fayandjohn.com"
#property link "mailto:john@fayandjohn.com" #property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 White


//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
extern int RequiredWaveHeight=40;

//---- 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("ICWR("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");

//---- initialization done
return(0);
}

//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+

int deinit() // Removes all lines and text
{ // from the chart upon removal
// of the indicator
ObjectDelete("ActiveWave");
ObjectDelete("Fibo");
return(0);
}

//+------------------------------------------------------------------+
//| Main function |
//+------------------------------------------------------------------+
int start()
{
int shift,back,lasthighpos,lastlowpos,LastActivePos;
double val,res;
double curlow,curhigh,lasthigh,lastlow,LastActive;

int AWStartPos, AWEndPos;
double AWStart, AWEnd;

double FiboL, FiboH, FiboLC, FiboLR, FiboHR, FiboHC;

for(shift=Bars-ExtDepth; shift>=0; shift--)
{
// The beginning code of this for loop is dedicated
// to finding a low endpoint of a zig-zag
val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)];
// Start at beginning of data
// - Get low of last depth (12) periods
// - Repeat low search of 12 periods,
// advancing 1 bar every search (for loop)

if(val==lastlow) // If this is not a new low
val=0.0; // - Reset the val marker to dbl 0

else // Otherwise, if it is a new low
{
lastlow=val; // - Record this new low in lastlow for future reference
if((Low[shift]-val)>(ExtDeviation*Point))
val=0.0; // If the low of the current bar is 6 or
// more pips greater than the lowest low of the last
// depth (12) periods, then reset val to dbl 0.
// Ie: continue the zig because the line is going up

else // Otherwise, if the current low is within 6 pips
{ // of the lowest low of the last 12 bars
for(back=1; back<=ExtBackstep; back++)
{ // Check back 3 bars, and if each value over those
// three bars is greater than the current lowest low,
// then reset the map buffer value to 0 because
// we have a new lower low.
res=ExtMapBuffer[shift+back];
if((res!=0)&&(res>val))
ExtMapBuffer[shift+back]=0.0;
}
}
}

ExtMapBuffer[shift]=val; // Set our current bar to 0 (continuation of zig) if:
// - A new low has not been reached;
// - The current bar is 6 pips beyond the lowest low
// Set our current bar to the lowest low if:
// - It is within 6 pips of the lowest low and
// and go back over the last three bars and set them
// to continuation of zig as well if they are greater
// than the new lowest value


// Same deal for below, except the case is reversed
// and everything is done in terms of trying to find
// the high zig-zag endpoint
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<val))
ExtMapBuffer2[shift+back]=0.0;
}
}
}
ExtMapBuffer2[shift]=val;
}

// final cutting
lasthigh=-1;
lasthighpos=-1;
lastlow=-1;
lastlowpos=-1;

for(shift=Bars-ExtDepth; shift>=0; shift--)
{
curlow=ExtMapBuffer[shift];
curhigh=ExtMapBuffer2[shift];

if((curlow==0)&&(curhigh==0)) // Break into the next cycle of the loop
continue; // to try and find the next zig-zap endpoint

if(curhigh!=0) // If there is a current high, then:
{
if(lasthigh>0) // If there was a previous high already:
{
if(lasthigh<curhigh) // - Set the last high to 0 if it is less than the current high
ExtMapBuffer2[lasthighpos]=0;
else // - Set the current bar to 0 if it is less than the last high
ExtMapBuffer2[shift]=0;
}

if(lasthigh<curhigh || lasthigh<0)
{ // If there was no last high or the last high was less than the current high
lasthigh=curhigh; // - Set the current high to be the last high (keep record of it)
lasthighpos=shift; // - Set the current bar to the lasthighpos (keep record of it)
}
lastlow=-1; // Since we just had a new high, reset the lastlow flag
}

if(curlow!=0) // If there is a low, then do the same as above, except for the case of lows instead of highs
{
if(lastlow>0)
{
if(lastlow>curlow)
ExtMapBuffer[lastlowpos]=0;
else
ExtMapBuffer[shift]=0;
}

if((curlow<lastlow)||(lastlow<0))
{
lastlow=curlow;
lastlowpos=shift;
}
lasthigh=-1;
}
}

for(shift=Bars-1; shift>=0; shift--)
{ // Go through all the bars
if(shift>=Bars-ExtDepth) // If we are not at the beginning comparison bars,
ExtMapBuffer[shift]=0.0; // then set the low buffer to 0
else
{ // Otherwise:
res=ExtMapBuffer2[shift]; // - If the current bar has a high, set the low
if(res!=0.0) // buffer to contain the high
ExtMapBuffer[shift]=res;
} // Looks like this function brings the highs into the lows
} // so that all the zig-zags can be drawn from one function

LastActive = -1;
LastActivePos = -1;

for(shift=0; shift<=Bars-ExtDepth; shift++)
{
if(ExtMapBuffer[shift]!=0.0)
{
if(LastActive > 0)
{
if(MathAbs(LastActive - ExtMapBuffer[shift]) >= RequiredWaveHeight*Point)
{
AWStartPos = shift;
AWStart = ExtMapBuffer[shift];
AWEndPos = LastActivePos;
AWEnd = LastActive;

if(ObjectFind("ActiveWave") != 0)
{
ObjectCreate("ActiveWave", OBJ_TREND, 0, Time[AWStartPos], AWStart, Time[AWEndPos], AWEnd);
ObjectSet("ActiveWave", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("ActiveWave", OBJPROP_COLOR, Red);
ObjectSet("ActiveWave", OBJPROP_WIDTH, 3);
ObjectSet("ActiveWave", OBJPROP_RAY, false);
}
else
{
ObjectMove("ActiveWave", 0, Time[AWStartPos], AWStart);
ObjectMove("ActiveWave", 1, Time[AWEndPos], AWEnd);
}

if(AWStart < AWEnd)
{
FiboL = AWStart;
FiboH = AWEnd;
}
else
{
FiboL = AWEnd;
FiboH = AWStart;
}

FiboLC = FiboL + (FiboH - FiboL)*0.25;
FiboLR = FiboL + (FiboH - FiboL)*0.382;
FiboHR = FiboL + (FiboH - FiboL)*0.618;
FiboHC = FiboL + (FiboH - FiboL)*0.75;


if(ObjectFind("Fibo") != 0)
{
ObjectCreate("Fibo", OBJ_FIBO, 0, Time[AWStartPos], AWStart, Time[AWEndPos], AWEnd);
ObjectSet("Fibo", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("Fibo", OBJPROP_COLOR, Green);
ObjectSet("Fibo", OBJPROP_WIDTH, 2);
ObjectSet("Fibo", OBJPROP_FIBOLEVELS, 6);
/* ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+0, FiboL);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+1, FiboLC);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+2, FiboLR);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+3, FiboHR);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+4, FiboHC);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+6, FiboH); */

ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+0, 0);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+1, 0.25);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+2, 0.382);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+3, 0.618);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+4, 0.75);
ObjectSet("Fibo", OBJPROP_FIRSTLEVEL+5, 1);
}
else
{
ObjectMove("Fibo", 0, Time[AWStartPos], AWStart);
ObjectMove("Fibo", 1, Time[AWEndPos], AWEnd);
}
break;
}
}
LastActive = ExtMapBuffer[shift];
LastActivePos = shift;
}
}
}
發表於 16-9-30 10:28 | 顯示全部樓層
海鮮大 解決了嗎
 樓主| 發表於 16-9-30 21:55 | 顯示全部樓層

2016-09-30_215332.jpg

感謝關心,自已在網路上找,找到個還能撐著勉強用的,還在熟悉中。不懂程式真是一大敗筆。

評分

參與人數 2金錢 +2 收起 理由
tinyding + 1  
manhavecoco + 1 按一個讚 ^^ 祝福

查看全部評分

 樓主| 發表於 16-10-1 09:10 | 顯示全部樓層
本帖最後由 生猛海鮮 於 16-10-1 09:13 編輯
MarkHsu 發表於 16-10-1 07:20
路過就順手複製了一下,不知道是不是版主要的東西。也測了一下,ZigZag指標? ...

感謝MarkHsu您的幫忙,已把coco幣全部轉過去給您了。雖然不知道這程式合不合用。但至也是可以看看是什麼東西。另外想再麻煩您一件事情,不知道可不可以。我想改另一個波浪指標的顏色。您就再順手一下,幫我這個程式智障改一下好嗎。這個指標只能用一個顏色來表示,我想讓它可以表示為零軸以上紅色,零軸以下綠色。這樣比較符合多空的意義跟macd相似。

2016-10-01_091246.jpg





Elliott Wave Oscillator.rar

602 Bytes, 下載次數: 155

發表於 16-10-1 22:39 | 顯示全部樓層
我盡力。看版大喜歡什麼顏色自己調。

Elliott Wave Oscillator 2.0.zip

782 Bytes, 下載次數: 10

售價: 2 金錢  [記錄]

紅配綠還蠻好看的

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-12-23 18:15

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 |