文华财经波浪画线高低点画线指标源码:
M:=21;
STEP1:=2/100;
MVALUE1:=20/100;
SARLINE:=SAR(4,STEP1,MVALUE1),NODRAW;
CON:=H>HV(H,M) AND SARLINE>0;
CNX:=REF(CON,1) AND H<REF(H,1);
NN:=BARSLAST(CNX)+1;
COM:=L<LV(L,M) AND SARLINE<0;
CMX:=REF(COM,1) AND L>REF(L,1);
MM:=BARSLAST(CMX)+1;
DRAWLINE3(CNX AND REF(EXIST(CNX,NN),1),REF(L,MM),MM,CMX AND REF(EXIST(CMX,MM),1),REF(H,NN),NN,0),COLORRED,LINETHICK3;
DRAWLINE3(CMX AND REF(EXIST(CMX,MM),1),REF(H,NN),NN,CNX AND REF(EXIST(CNX,NN),1),REF(L,MM),MM,0),COLORGREEN,LINETHICK3;
MBV:=MAX(MM,NN);
NBV:=MIN(MM,NN);
ADM1:=BACKSET(ISLASTBAR AND MM=MBV,MBV+1);
ADN1:=BACKSET(ISLASTBAR AND MM=MBV,NBV+1);
DRAWLINE1(CROSS(ADM1=1,0.5),L,CROSS(ADN1=1,0.5),H,0),COLORRED,LINETHICK3;
ADM2:=BACKSET(ISLASTBAR AND NN=MBV,MBV+1);
ADN2:=BACKSET(ISLASTBAR AND NN=MBV,NBV+1);
DRAWLINE1(CROSS(ADM2=1,0.5),H,CROSS(ADN2=1,0.5),L,0),COLORGREEN,LINETHICK3;
DRAWLINE3(ISLASTBAR AND H<REF(H,NBV) AND NBV=NN,L,0,1,REF(H,NN),NN,0),COLORGREEN,LINETHICK3;
DRAWLINE3(ISLASTBAR AND L>REF(L,NBV) AND NBV=MM,H,0,1,REF(L,MM),MM,0),COLORRED,LINETHICK3;
DD:CNX AND REF(EXIST(CNX,NN),1);
LL:CNX AND REF(EXIST(CNX,NN),1);
HH:CMX AND REF(EXIST(CMX,MM),1);
DRAWLINE3(HH,REF(REF(L,MM),BARSLAST(DD)),BARSLAST(DD)+REF(MM,BARSLAST(DD)),1,REF(REF(L,MM),BARSLAST(DD)),NN,0);
DRAWLINE3(HH,REF(REF(L,MM),BARSLAST(DD)),NN,1,REF(H,NN),NN,0);
DRAWSHIFTNUMBER(HH,REF(REF(L,MM),BARSLAST(DD)),BARSLAST(DD)+REF(MM,BARSLAST(DD))-NN,0,COLORYELLOW,0,NN),VALIGN0;
DRAWSHIFTNUMBER(HH,REF(REF(L,MM),BARSLAST(DD)),(REF(H,NN)-REF(REF(L,MM),BARSLAST(DD)))/REF(REF(L,MM),BARSLAST(DD))*100,0,COLORYELLOW,0,NN),VALIGN2;
DRAWLINE3(DD,REF(REF(H,NN),BARSLAST(HH)),BARSLAST(HH)+REF(NN,BARSLAST(HH)),1,REF(REF(H,NN),BARSLAST(HH)),MM,0);
DRAWLINE3(DD,REF(REF(H,NN),BARSLAST(HH)),MM,1,REF(H,MM),MM,0);
DRAWSHIFTNUMBER(DD,REF(REF(H,NN),BARSLAST(HH)),BARSLAST(HH)+REF(NN,BARSLAST(HH))-MM,0,COLORYELLOW,0,MM),VALIGN0;
DRAWSHIFTNUMBER(DD,REF(REF(H,NN),BARSLAST(HH)),(REF(REF(H,NN),BARSLAST(HH))-REF(L,MM))/REF(L,MM)*100,0,COLORYELLOW,0,MM),VALIGN2;
DRAWLINE3(LL&&BACKSET(ISLASTBAR&&BARSLAST(LL)<BARSLAST(HH),BARSLAST(LL)+1),REF(L,MM),MM,1,REF(REF(L,MM),SUMBARS(LL,2)-1),REF(MM,SUMBARS(LL,2)-1)+SUMBARS(LL,2)-1,0),COLORYELLOW;
DRAWLINE3(HH&&BACKSET(ISLASTBAR&&BARSLAST(LL)>BARSLAST(HH),BARSLAST(HH)+1),REF(H,NN),NN,1,REF(REF(H,NN),SUMBARS(HH,2)-1),REF(NN,SUMBARS(HH,2)-1)+SUMBARS(HH,2)-1,0),COLORYELLOW;