UID121512
积分300
学分
推广 个
预报后涨停 支
阅读权限40
在线时间 小时
注册时间2011-7-9
最后登录1970-1-1
|
设立参数:百分比(3,20,5), 右数峰序(2,20,2)}
{ZIG(3,5);}
{百分比:=5};
{右数峰序:=2;}
A1:=MA(CLOSE,5);
A2:=MA(CLOSE,10);
A3:=MA(CLOSE,20);
A4:=MA(CLOSE,30);
DT:=CLOSE>A1 AND A1>A2 AND A2>A3 AND A3>A4;
{MA5:MA(C,5);}{HTTP://U.178448.COM/SPACE.PHP?UID=30578}
MA10:=MA(C,10);{WEN98编写}
MA20:=MA(C,20);
波谷值:=CONST(TROUGH(2,百分比,1)),NODRAW;{前M个ZIG转向波谷值}
波谷值1:=CONST(TROUGH(2,百分比,2)),NODRAW;
波谷值2:=CONST(TROUGH(2,百分比,3)),NODRAW;
波谷值3:=CONST(TROUGH(2,百分比,4)),NODRAW;
波谷值4:=CONST(TROUGH(2,百分比,5)),NODRAW;
波谷距离:= 1+CONST(TROUGHBARS(2,百分比,1)),NODRAW;{前M个ZIG转向波谷到当前距离}
{例如:TROUGH(2,5,2)表示%5最低价ZIG转向的前2个波谷到当前的周期数};
波谷距离1:= 1+CONST(TROUGHBARS(2,百分比,2)),NODRAW;
波谷距离2:= 1+CONST(TROUGHBARS(2,百分比,3)),NODRAW;
波谷距离3:= 1+CONST(TROUGHBARS(2,百分比,4)),NODRAW;
波谷距离4:= 1+CONST(TROUGHBARS(2,百分比,5)),NODRAW;
波峰值:=CONST(PEAK(1,百分比,右数峰序));
波峰值1:=CONST(PEAK(1,百分比,3));
波峰值2:=CONST(PEAK(1,百分比,4));
波峰值3:=CONST(PEAK(1,百分比,5));
波峰值4:=CONST(PEAK(1,百分比,6));
{例如EAK(1,5,1)表示%5最高价ZIG转向的上一个波峰的数值}
N:=0.001;
XG:=ABS(波峰值-波谷值)<=N {AND BARSCOUNT(V)>60};
XG1:=ABS(波峰值1-波谷值1)<=N {AND BARSCOUNT(V)>60};
XG2:=ABS(波峰值2-波谷值2)<=N {AND BARSCOUNT(V)>60};
XG3:=ABS(波峰值3-波谷值3)<=N {AND BARSCOUNT(V)>60};
XG4:=ABS(波峰值4-波谷值4)<=N {AND BARSCOUNT(V)>60};
波峰距离:= 1+CONST(PEAKBARS(1,百分比,右数峰序)),NODRAW;
{PEAKBARS(K,N,M)表示之字转向ZIG(K,N)的前M个波峰到当前的周期数,M必须大于等于1}
BFJL:=1+CONST(PEAKBARS(1,百分比,3)),NODRAW;
BFJL1:=1+CONST(PEAKBARS(1,百分比,4)),NODRAW;
BFJL2:=1+CONST(PEAKBARS(1,百分比,5)),NODRAW;
BFJL3:=1+CONST(PEAKBARS(1,百分比,6)),NODRAW;
距离:=CURRBARSCOUNT;
JZXRAWLINE(距离=波峰距离 AND XG,波谷值,距离=1,波谷值,1),COLORMAGENTA;
JZX1RAWLINE(距离=BFJL AND XG1,波谷值1,距离=波谷距离,波谷值1,1),COLORMAGENTA;
JZX2RAWLINE(距离=BFJL1 AND XG2,波谷值2,距离=波谷距离1,波谷值2,1),COLORMAGENTA;
JZX3RAWLINE(距离=BFJL2 AND XG3,波谷值3,距离=波谷距离2,波谷值3,1),COLORMAGENTA;
JZX4RAWLINE(距离=BFJL3 AND XG4,波谷值4,距离=波谷距离3,波谷值4,1),COLORMAGENTA;
DRAWTEXT(距离=波谷距离 AND XG,L*0.98,' 峰谷线'),COLORYELLOW;
DRAWTEXT(距离=波谷距离1 AND XG1,L*0.98,' 峰谷线'),COLORYELLOW;
DRAWTEXT(距离=波谷距离2 AND XG2,L*0.98,' 峰谷线'),COLORYELLOW;
DRAWTEXT(距离=波谷距离3 AND XG3,L*0.98,' 峰谷线'),COLORYELLOW;
DRAWTEXT(距离=波谷距离4 AND XG4,L*0.98,' 峰谷线'),COLORYELLOW;
DRAWICON(距离=波峰距离,H*1.01,2);{波峰位置}
DRAWICON(距离=波谷距离,L*0.985,1);{波谷位置}
DRAWICON(距离=BFJL,H*1.01,2);
DRAWICON(距离=BFJL1,H*1.01,2);
DRAWICON(距离=波谷距离1,L*0.985,1);
DRAWICON(距离=波谷距离2,L*0.985,1);
DRAWICON(距离=波谷距离3,L*0.985,1);
DRAWICON(距离=波谷距离4,L*0.985,1);
JZX0RAWLINE(距离=1+CONST(TROUGHBARS(2,百分比,2)) AND XG,
波谷值,距离=1,波谷值,1),COLORMAGENTA;
精准点:=(ABS(H-波谷值)<=N OR ABS(L-波谷值)<=N) {AND 距离<=120};
精准点1:=(ABS(H-波谷值1)<=N OR ABS(L-波谷值1)<=N);
精准点2:=(ABS(H-波谷值2)<=N OR ABS(L-波谷值2)<=N);
精准点3:=(ABS(H-波谷值3)<=N OR ABS(L-波谷值3)<=N);
精准点4:=(ABS(H-波谷值4)<=N OR ABS(L-波谷值4)<=N);
STICKLINE(精准点,波谷值,波谷值,3,1),COLORYELLOW;
DRAWTEXT(精准点,波谷值*0.98,'A');
DRAWTEXT(精准点1,波谷值1*0.98,'A1');
DRAWTEXT(精准点2,波谷值2*0.98,'A2');
DRAWTEXT(精准点3,波谷值3*0.98,'A3');
DRAWTEXT(精准点4,波谷值4*0.98,'A4');
JZX5RAWLINE(精准点1,波谷值,精准点,波谷值,1),COLORBLUE;
JZX6RAWLINE(精准点2,波谷值1,精准点1,波谷值1,1),COLORBLUE;
JZX7RAWLINE(精准点3,波谷值2,精准点2,波谷值2,1),COLORBLUE;
JZX8RAWLINE(精准点4,波谷值3,精准点3,波谷值3,1),COLORBLUE;
{MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
主力20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;};
精准点0:=(ABS(H-波峰值)<=N OR ABS(L-波峰值)<=N) {AND 距离<=120};
精准点A:=(ABS(H-波峰值1)<=N OR ABS(L-波峰值1)<=N);
精准点B:=(ABS(H-波峰值2)<=N OR ABS(L-波峰值2)<=N);
精准点C:=(ABS(H-波峰值3)<=N OR ABS(L-波峰值3)<=N);
精准点D:=(ABS(H-波峰值4)<=N OR ABS(L-波峰值4)<=N);
STICKLINE(精准点0,波峰值,波峰值,3,1),COLORYELLOW;
DRAWTEXT(精准点0,波峰值,'D');
DRAWTEXT(精准点A,波峰值1,'D1');
DRAWTEXT(精准点B,波峰值2,'D2');
DRAWTEXT(精准点C,波峰值3,'D3');
DRAWTEXT(精准点D,波峰值4,'D4');
JZX51:DRAWLINE(精准点A,波峰值,精准点0,波峰值,1),COLORYELLOW;
JZX61:DRAWLINE(精准点B,波峰值1,精准点A,波峰值1,1),COLORYELLOW;
JZX71:DRAWLINE(精准点C,波峰值2,精准点B,波峰值2,1),COLORYELLOW;
JZX81:DRAWLINE(精准点D,波峰值3,精准点C,波峰值3,1),COLORYELLOW;
{4.咬住峰顶线}
FDX:=PEAK(1,5,1);{REF(HHV(H,60),5)};{上一波峰值}
TJ:=BETWEEN(MA(H,3),波峰值1*0.998,波峰值1*1.02);
T1J:=BETWEEN(MA(H,3),波峰值2*0.998,波峰值2*1.02);
T2J:=BETWEEN(MA(H,3),波峰值3*0.998,波峰值3*1.02);
T3J:=BETWEEN(MA(H,3),波峰值*0.998,波峰值*1.02);
咬住峰顶线:=COUNT(TJ,3)>=2 OR COUNT(T1J,3)>=2 OR COUNT(T2J,3)>=2 OR
COUNT(T3J,3)>=2;
{DRAWTEXT(咬住峰顶线,L*0.98,'咬');}
异向并肩精准:= MIN(O,C)=REF(MAX(O,C),1) ;
DRAWTEXT(异向并肩精准,L*0.95,'异向精准'),COLORRED;
转载请注明出自股海明灯论坛 http://www.178448.com/,本贴地址:http://www.178448.com/thread-176415-1-1.html |
|