马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
百分比:=5;
右数峰序:=10;
波谷值:=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转向波谷到当前距离}
波谷距离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));
N:=0.01;
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;
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;
JZX0:=DRAWLINE(距离=1+CONST(TROUGHBARS(2,百分比,2)) AND XG,波谷值,距离=1,波谷值,1),COLORWHITE;
精准点:=(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);
DRAWTEXT(精准点,波谷值*1,'1'),COLORYELLOW;
DRAWTEXT(精准点1,波谷值1*1,'2'),COLORYELLOW;
DRAWTEXT(精准点2,波谷值2*1,'3'),COLORYELLOW;
DRAWTEXT(精准点3,波谷值3*1,'4'),COLORYELLOW;
DRAWTEXT(精准点4,波谷值4*1,'5'),COLORYELLOW;
精准点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);
DRAWTEXT(精准点0,波峰值*1,'A'),COLORYELLOW;
DRAWTEXT(精准点A,波峰值1*1,'B'),COLORYELLOW;
DRAWTEXT(精准点B,波峰值2*1,'C'),COLORYELLOW;
DRAWTEXT(精准点C,波峰值3*1,'D'),COLORYELLOW;
DRAWTEXT(精准点D,波峰值4*1,'E'),COLORYELLOW;
数字为谷底,字母为峰顶
|