文华财经软件波浪高低点红绿画线指标源码:
HH:=CROSS(H>=REF(H,1) AND H>=REF(H,2) AND H>=REF(H,3) AND H>=REFX(H,1) AND H>=REFX(H,2) AND H>=REFX(H,3) ,0.5);
LL:=CROSS(L<=REF(L,1) AND L<=REF(L,2) AND L<=REF(L,3) AND L<=REFX(L,1) AND L<=REFX(L,2) AND L<=REFX(L,3) ,0.5);
HH1:=IF(HH&&LL&&REF(BARSLAST(HH)>BARSLAST(LL),1)&&H>REF(VALUEWHEN(LL,L),1),HH,IF(HH&&NOT(HH&&LL)&&H>REF(VALUEWHEN(LL,L),1),HH,0));
LL1:=IF(HH&&LL&&REF(BARSLAST(HH)<BARSLAST(LL),1)&&L<REF(VALUEWHEN(HH,H),1),LL,IF(LL&&NOT(HH&&LL)&&L<REF(VALUEWHEN(HH,H),1),LL,0));
HHH:=CROSS(BACKSET(REFX(COUNT(LL1,BARSLAST(HH1)+1)=1&&LL1&&REF(SUM(HH1,BARSLAST(LL1))>0,1),1)||ISLASTBAR&&BARSLAST(CROSS(HH1,0.5))<BARSLAST(CROSS(LL1,0.5)),HHVBARS(IF(HH1,H,0),SUMBARS(LL1,1))+1),0.5);
LLL:=CROSS(BACKSET(REFX(COUNT(HH1,BARSLAST(LL1)+1)=1&&HH1&&REF(SUM(LL1,BARSLAST(HH1))>0,1),1)||ISLASTBAR&&BARSLAST(CROSS(HH1,0.5))>BARSLAST(CROSS(LL1,0.5)),LLVBARS(IF(LL1,L,999999),SUMBARS(HH1,1))+1),0.5);
HHHH:=BACKSET(LLL,HHVBARS(IF(HHH,H,0),SUMBARS(LLL,2))+1);
LLLL:=BACKSET(HHH,LLVBARS(IF(LLL,L,9999999),SUMBARS(HHH,2))+1);
DRAWLINE1(HHHH,H,LLLL,L,0),RGB(0,200,0),LINETHICK3;//高点与低点连线
DRAWLINE1(LLLL,L,HHHH,H,0),COLORRED,LINETHICK3;//低点与高点连线