圖:WenHua StartPage WH6官方標準纏論 來源:
圖:支撐阻力 源碼1:
源碼2: // 標準'纏' M=5; //M值需要大于等于5 G=MA(C,5); D=MA(C,10); NNH=BARSLAST(H=HHV(H,M)) ,NODRAW; NNL=BARSLAST(L=LLV(L,M)) ,NODRAW; NN=IF(REF(G,NNH)REF(D,NNH) AND NNH=M-3,NNH,IF(REF(G,NNL)REF(D,NNL) AND NNL=M-3,NNL,M-2)) ,NODRAW; NNN=IF(ISLASTBAR AND NN0,NN,M-2) ,NODRAW; H1=REF(H,NNN)=HHV(H,M-1); L1=REF(L,NNN)=LLV(L,M-1); FG01=BACKSET(H1,NNN+1)BACKSET(H1,NNN),NODRAW;只設置前面第M-1個 FD01=BACKSET(L1,NNN+1)BACKSET(L1,NNN) ,NODRAW; FG02=FG01=FD01 AND GD,NODRAW; FD02=FG01=FD01 AND GD,NODRAW; TTTT=BARSLAST(FD01),NODRAW; FG0=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,M))=M-2,M-2,BARSLAST(FD01)))) AND FD02=0 ,NODRAW; FD0=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,M))=M-2,M-2,BARSLAST(FG01)))) AND FG02=0 ,NODRAW; 高低點間周期 GT=BARSLAST(FG0),NODRAW; DT=BARSLAST(FD0),NODRAW; 第一次處理高低點間多余的點 LLLL=DT=0 AND REF(DT,1)GT AND LREF(L,REF(DT,1)+1),NODRAW; FG1=BACKSET(REFX(GT,1)=0 AND GTDT AND REFX(H,1)=REF(H,GT),GT+1),NODRAW; FD1=BACKSET(REFX(DT,1)=0 AND DTGT AND REFX(L,1)=REF(L,DT),DT+1),NODRAW; FG11=IF(GT=0 AND REF(GT,1)DT AND IF(REF(G,BARSLAST(L=LLV(L,M)))REF(D,BARSLAST(L=LLV(L,M))),BARSLAST(L=LLV(L,M))M-2,1) AND HREF(H,REF(GT,1)+1),1,0),NODRAW; FD11=IF(DT=0 AND REF(DT,1)GT AND IF(REF(G,BARSLAST(H=HHV(H,M)))REF(D,BARSLAST(H=HHV(H,M))),BARSLAST(H=HHV(H,M))M-2,1) AND LREF(L,REF(DT,1)+1),1,0),NODRAW; 再次周期 GT1=BARSLAST(FG111 AND FG11 AND FG0),NODRAW; DT1=BARSLAST(FD111 AND FD11 AND FD0),NODRAW; FD2=BACKSET(REFX(GT1,1)=0 AND DT13 AND GT1-DT14 AND REF(L,DT1)LLV(L,GT1+M-2),DT1+1),NODRAW; FG2A=BACKSET(REFX(GT1,1)=0 AND DT13 AND GT1-DT14 AND REF(L,DT1)=LLV(L,GT1+M-2) AND REF(H,GT1)HHV(H,GT1+M-2),GT1+1),NODRAW; FG2B=IF(GT1=0 AND DT14 AND REF(GT1,1)-DT14 AND REF(L,DT1)=LLV(L,REF(GT1,1)+M-1) AND HHHV(H,REF(GT1,1)+M-1),1,0),NODRAW; FG2=BACKSET(REFX(DT1,1)=0 AND GT13 AND DT1-GT14 AND REF(H,GT1)HHV(H,DT1+M-2),GT1+1),NODRAW; FD2A=BACKSET(REFX(DT1,1)=0 AND GT13 AND DT1-GT14 AND REF(H,GT1)=HHV(L,DT1+M-2) AND REF(L,DT1)LLV(L,DT1+M-2),DT1+1),NODRAW; FD2B=IF(DT1=0 AND GT14 AND REF(DT1,1)-GT14 AND REF(H,GT1)=HHV(H,REF(DT1,1)+6) AND LLLV(L,REF(DT1,1)+M-1),1,0),NODRAW; TTTTTT= HREF(H,REF(GT1,1)+1) AND DT14,NODRAW; HHHHHH=REF(LLV(L,10),DT1),NODRAW; 前長后短; FG21=IF(GT1=0 AND DT14 AND H=REF(H,REF(GT1,1)+1) ,1,0),NODRAW; FD21=IF(DT1=0 AND GT14 AND L=REF(L,REF(DT1,1)+1) ,1,0),NODRAW; 前短后長,前低后高(去低); FD231=BACKSET(REFX(GT1,1)=0 AND DT13 AND GT1DT1 AND GT1-DT14 AND REFX(H,1)REF(H,GT1) AND REF(L,DT1)REF(LLV(L,10),DT1),DT1+1),NODRAW; FG23=BACKSET(REFX(GT1,1)=0 AND DT13 AND GT1DT1 AND GT1-DT14 AND REFX(H,1)REF(H,GT1) AND (REF(H,GT1)REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW; 前短后長,去2; FG231=BACKSET(REFX(DT1,1)=0 AND GT13 AND DT1GT1 AND DT1-GT14 AND REFX(L,1)REF(L,DT1) AND REF(H,GT1)REF(HHV(H,10),GT1) ,GT1+1),NODRAW; FD23=BACKSET(REFX(DT1,1)=0 AND GT13 AND DT1GT1 AND DT1-GT14 AND REFX(L,1)REF(L,DT1) AND ( REF(L,DT1)REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW; 前短后長,去3; FDD23=REF(H,GT1)REF(HHV(H,10),GT1) OR REF(FD23,DT1)=0,NODRAW; FD24=BACKSET(REFX(GT1,1)=0 AND DT13 AND GT1DT1 AND GT1-DT14 AND REFX(H,1)HHV(H,GT1+3) AND REF(L,DT1)LLV(L,DT1+5),DT1+1),NODRAW; FG24=BACKSET(REFX(DT1,1)=0 AND GT13 AND DT1GT1 AND DT1-GT14 AND REFX(L,1)LLV(L,DT1+3) AND REF(H,GT1)HHV(H,GT1+5),GT1+1),NODRAW; 做兩次高低點間多余的點 GT2=BARSLAST(FG211 AND FG231 AND FG2311 AND FG241 AND FG21 AND FG2A1 AND FG2B1 AND GT1=0),NODRAW; DT2=BARSLAST(FD211 AND FD231 AND FD2311 AND FD241 AND FD21 AND FD2A1 AND FD2B1 AND DT1=0),NODRAW; FG3=BACKSET(REFX(GT2,1)=0 AND GT2DT2 AND REFX(H,1)=REF(H,GT2),GT2+1),NODRAW; FD3=BACKSET(REFX(DT2,1)=0 AND DT2GT2 AND REFX(L,1)=REF(L,DT2),DT2+1),NODRAW; FG31=IF(GT2=0 AND REF(GT2,1)DT2 AND HREF(H,REF(GT2,1)+1),1,0),NODRAW; FD31=IF(DT2=0 AND REF(DT2,1)GT2 AND LREF(L,REF(DT2,1)+1),1,0),NODRAW; GT3=BARSLAST(GT2=0 AND FG31 AND FG311 ),NODRAW; DT3=BARSLAST(DT2=0 AND FD31 AND FD311),NODRAW; FG4=BACKSET(REFX(GT3,1)=0 AND GT3DT3 AND REFX(H,1)=REF(H,GT3),GT3+1),NODRAW; FD4=BACKSET(REFX(DT3,1)=0 AND DT3GT3 AND REFX(L,1)=REF(L,DT3),DT3+1),NODRAW; FG41=IF(GT3=0 AND REF(GT3,1)DT3 AND HREF(H,REF(GT3,1)+1),1,0),NODRAW; FD41=IF(DT3=0 AND REF(DT3,1)GT3 AND LREF(L,REF(DT3,1)+1),1,0),NODRAW; HHH=GT3=0 AND FG311 AND FG31,NODRAW; LLL=DT3=0 AND FD311 AND FD31,NODRAW; DRAWLINE1(HHH ,H,LLL,L,0),COLORGREEN,LINETHICK3;綠色 DRAWLINE1(LLL,L,HHH ,H,0),COLORRED,LINETHICK3;紅色 最后一段畫線 N1=BARSLAST(HHH)+1; N2=BARSLAST(LLL)+1; DRAWLINE3(ISLASTBAR&&MIN(N1,N2)=N2&&LREF(L,N2-1),REF(L,N2-1),N2-1,ISLASTBAR,H,0,0),COLORRED,LINETHICK3;紅色 DRAWLINE3(ISLASTBAR&&MIN(N1,N2)=N1&&HREF(H,N1-1),REF(H,N1-1),N1-1,ISLASTBAR,L,0,0),COLORGREEN,LINETHICK3;綠色
公式管理指引:
2. 系統(tǒng)工具 - 指標管理器 3. 新建 4. 輸入指標名稱(唯一標識) 5. 粘貼,確定 6. 回到K線,鍵盤輸入指標名稱,即可加載 7. 指標加載成功
|
|