{左峰顶}
FTY:=C;
FA1:=REF(FTY,10)=HHV(FTY,2*10+1);
FB1:=FILTER(FA1,10);
FC1:=BACKSET(FB1,10+1);
FHD:=FILTER(FC1,10);
FA2:=REF(FTY,10)=LLV(FTY,2*10+1);
FB2:=FILTER(FA2,10);
FC3:=BACKSET(FB2,10+1);
FLD:=FILTER(FC3,10);
LDM56:=CONST(BARSLAST(FHD));
LDM57:=CONST(BARSLAST(FLD));
前期低位:=REF(L,BARSLAST(FLD));
前期高位:=REF(MAX(C,O),BARSLAST(FHD));
左峰:IF(CURRBARSCOUNT<=LDM56+1,CONST(IF(LDM56=0,前期高位,REF(前期高位,LDM56))),DRAWNULL),COLORGREEN ;
左谷:IF(CURRBARSCOUNT<=LDM57+1,CONST(IF(LDM57=0,前期低位,REF(前期低位,LDM57))),DRAWNULL),COLORCYAN;
{峰谷线}
LDM13:=1;
LDM32:=REF(HIGH,5)=HHV(HIGH,2*5+1);
LDM33:=FILTER(LDM32,5);
LDM34:=BACKSET(LDM33,5+1);
LDM35:=FILTER(LDM34,5);
LDM36:=REF(HIGH,BARSLAST(LDM35));
LDM37:=REF(MAX(CLOSE,OPEN),5)=HHV(MAX(CLOSE,OPEN),2*5+1);
{满足LDM35条件那天的最高价}
LDM38:=FILTER(LDM37,5);
LDM39:=BACKSET(LDM38,5+1);
LDM40:=FILTER(LDM39,5);
LDM41:=REF(MAX(CLOSE,OPEN),BARSLAST(LDM40));
LDM42:=REF(LOW,5)=LLV(LOW,2*5+1);
LDM43:=FILTER(LDM42,5);
LDM44:=BACKSET(LDM43,5+1);
LDM45:=FILTER(LDM44,5);
LDM46:=REF(LOW,BARSLAST(LDM45));
LDM47:=REF(MIN(CLOSE,OPEN),5)=LLV(MIN(CLOSE,OPEN),2*5+1);
LDM48:=FILTER(LDM47,5);
LDM49:=BACKSET(LDM48,5+1);
LDM50:=FILTER(LDM49,5);
LDM51:=REF(MIN(CLOSE,OPEN),BARSLAST(LDM50));
LDM52:=IF(LDM13=0,LDM36,LDM41);
LDM53:=IF(LDM13=0,LDM46,LDM51);
LDM54:=CONST(BARSLAST(LDM35));
LDM55:=CONST(BARSLAST(LDM50));
凹峰:IF(CURRBARSCOUNT<=LDM54+1,CONST(IF(LDM54=0,LDM52,REF(LDM52,LDM54))),DRAWNULL),COLORGREEN DOTLINE;
凹谷:IF(CURRBARSCOUNT<=LDM55+1,CONST(IF(LDM55=0,LDM53,REF(LDM53,LDM55))),DRAWNULL),COLORCYAN DOTLINE;
DRAWTEXT(ISLASTBAR,凹峰,'----------------')COLORGREEN;
DRAWTEXT(ISLASTBAR,凹谷,'----------------')COLORCYAN;
DRAWNUMBER(ISLASTBAR,凹峰,凹峰);
DRAWNUMBER(ISLASTBAR,凹谷,凹谷);
|