文华财经期货高低点连线波浪画线指标公式源码:
N:=60;
HHX:=H>=HV(H,N);
NH:=BARSLAST(HHX)+1;
LLX:=L<=LV(L,N);
NL:=BARSLAST(LLX)+1;
AH:BACKSET(COUNT(LLX,NH)&&LLX&&EXIST(HHX,SUMBARS(LLX,2)),HHVBARS(IF(HHX,H,0),SUMBARS(LLX,2))+1),NODRAW;
AL:=BACKSET(COUNT(HHX,NL)&&HHX&&EXIST(LLX,SUMBARS(HHX,2)),LLVBARS(IF(LLX,L,999999),SUMBARS(HHX,2))+1);
TT:=BACKSET(ISLASTBAR,2760);
DRAWLINE1(CROSS(AH=1,0.5)&&TT,H,CROSS(AL=1,0.5)&&TT,L,0),DOT,COLORGREEN;
DRAWLINE1(CROSS(AL=1,0.5)&&TT,L,CROSS(AH=1,0.5)&&TT,H,0),DOT,COLORRED;
CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(AH=1,0.5)&&TT,2)),0.5),NODRAW;
//DRAWLINE1(CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(AH=1,0.5)&&TT,2)),0.5),H,CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(AH=1,0.5)&&TT,1)),0.5),H,1),DOT,COLORRED;
//DRAWLINE1(CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(AL=1,0.5)&&TT,2)),0.5),L,CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(AL=1,0.5)&&TT,1)),0.5),L,1),DOT,COLORGREEN;
HH2:=H>=HV(H,N+1);
NH2:=BARSLAST(HH2)+1;
LL2:=L<=LV(L,N+1);
NL2:=BARSLAST(LL2)+1;
AH2:BACKSET(COUNT(LL2,NH2)&&LL2&&EXIST(HH2,SUMBARS(LL2,2)),HHVBARS(IF(HH2,H,0),SUMBARS(LL2,2))+1),NODRAW;
AL2:=BACKSET(COUNT(HH2,NL2)&&HH2&&EXIST(LL2,SUMBARS(HH2,2)),LLVBARS(IF(LL2,L,999999),SUMBARS(HH2,2))+1);
DRAWLINE3(BARSLAST(CROSS(AL2=1,0.5))<BARSLAST(CROSS(AH=1,0.5))&&ISLASTBAR,HHV(IF(HHX,H,0),BARSLAST(CROSS(AL=1,0.5))+1),HHVBARS(IF(HHX,H,0),BARSLAST(CROSS(AL=1,0.5))+1),
1,REF(L,BARSLAST(CROSS(AL=1,0.5))),BARSLAST(CROSS(AL=1,0.5)),0),DOT,COLORRED;
DRAWLINE3(BARSLAST(CROSS(AL2=1,0.5))>BARSLAST(CROSS(AH=1,0.5))&&ISLASTBAR,LLV(IF(LLX,L,999999),BARSLAST(CROSS(AH=1,0.5))+1),LLVBARS(IF(LLX,L,999999),BARSLAST(CROSS(AH=1,0.5))+1),
1,REF(H,BARSLAST(CROSS(AH=1,0.5))),BARSLAST(CROSS(AH=1,0.5)),0),DOT,COLORGREEN;