gwy 发表于 2007-8-7 10:03:00

yangsluo 发表于 2007-8-7 21:23:00

<P>貌似一个划线工具</P>

yangsluo 发表于 2007-8-10 23:05:00

<P>如何使用?指标导入成功后只能看出是一个划线工具,具体按照什么规则下单呢?</P>

bull 发表于 2007-8-10 23:47:00

他是画出“浪”,至于如何“数浪”,那就是个人的事情了,呵呵,100个人能数出101种浪,呵呵

crystalhui 发表于 2007-8-11 18:05:00

类似ziger,不过加了阻力和支撑线,好东西

东南风 发表于 2007-8-19 21:15:58

楼主能帮忙在这个指标中添加个50%的回调比例线吗,它里面只25%、38.2%和68.2%、75%及100%,50%也是很重要的位置,谢谢。。。:handshake

bull 发表于 2007-8-19 21:51:06

原帖由 东南风 于 2007-8-19 21:15 发表 http://bbs.520fx.com/images/common/back.gif
楼主能帮忙在这个指标中添加个50%的回调比例线吗,它里面只25%、38.2%和68.2%、75%及100%,50%也是很重要的位置,谢谢。。。:handshake
没时间台仔细看他的程序,根据你的要求外挂了50%线在上面,源码如下:

//| 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;
// 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-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;
if((res!=0)&&(res>val))
ExtMapBuffer=0.0;
}
}
}

ExtMapBuffer=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;

if(val==lasthigh)
val=0.0;
else
{
lasthigh=val;
if((val-High)>(ExtDeviation*Point))
val=0.0;
else
{
for(back=1; back<=ExtBackstep; back++)
{
res=ExtMapBuffer2;
if((res!=0)&&(res<val))
ExtMapBuffer2=0.0;
}
}
}
ExtMapBuffer2=val;
}

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

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

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=0;
else // - Set the current bar to 0 if it is less than the last high
ExtMapBuffer2=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=0;
else
ExtMapBuffer=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=0.0; // then set the low buffer to 0
else
{ // Otherwise:
res=ExtMapBuffer2; // - If the current bar has a high, set the low
if(res!=0.0) // buffer to contain the high
ExtMapBuffer=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!=0.0)
{
if(LastActive > 0)
{
if(MathAbs(LastActive - ExtMapBuffer) >= RequiredWaveHeight*Point)
{
AWStartPos = shift;
AWStart = ExtMapBuffer;
AWEndPos = LastActivePos;
AWEnd = LastActive;

if(ObjectFind("ActiveWave") != 0)
{
ObjectCreate("ActiveWave", OBJ_TREND, 0, Time, AWStart, Time, 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, AWStart);
ObjectMove("ActiveWave", 1, Time, 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, AWStart, Time, AWEnd);
DrawHLine("位置50",Time,FiboL + (FiboH - FiboL)*0.5,TimeCurrent(),Red);
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, AWStart);
ObjectMove("Fibo", 1, Time, AWEnd);
}
break;
}
}
LastActive = ExtMapBuffer;
LastActivePos = shift;
}
}
}

void DrawHLine(string LabelName,datetime Start,double P1,datetime Stop,color CL)
{
ObjectDelete(LabelName);
ObjectCreate(LabelName,OBJ_TREND,0,Start,P1,Stop,P1);
ObjectSet(LabelName,OBJPROP_COLOR,CL);
}

东南风 发表于 2007-8-19 22:46:09

非常感谢:victory:

zhuyabin 发表于 2007-10-25 20:49:27

版主加的50%线,为什么不能随着价格的变化而变化啊,是不动的。如向上的行情中,价格已经创出新高,那这波行情的50%位置也变了,可是版主加的50%线并不变。请版主修改成可以象其它线一样,可以随着价格的变化而变化的,谢谢

白色流星 发表于 2007-11-5 13:46:40

:L 这个...............

wqssky 发表于 2007-11-11 07:58:50

谢了,研究研究,很不错

zengxc 发表于 2007-11-11 11:46:19

基于黄金分割,感谢bull老大:)

f29825604 发表于 2008-7-4 01:33:10

拿來試試看
正在研究鐵柺李
柺來柺去的東西
Thanks!
感謝!

dxsdxs 发表于 2008-8-21 09:42:34

thank you boss

i like to take look at

hjgc 发表于 2008-9-27 15:02:28

这个不是波浪系统,而是ZUP系统的简化版,
里面包含:ZigZag(12,5,3)和最后一根ZigZag线的Fibo回调线,
源码中的Fibo数字是可人工调整的(添加,或删除)不必再外挂0.5这一栏。
页: 1 [2] 3 4 5 6 7 8 9 10 11
查看完整版本: [转帖]波浪交易系统