百分比:=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); |