NN:=4;//5 HH.:=H>HV(H,NN); NH:=BARSLAST(HH.)+1; LL.:=L<LV(L,NN); NL:=BARSLAST(LL.)+1; AH:=BACKSET(COUNT(LL.,NH)&&LL.,NH); AL:=BACKSET(COUNT(HH.,NL)&&HH.,NL); DRAWNUMBER1(CROSS(AH=1,0.5),H+0.1,H,0),COLORYELLOW,ALIGN1,FONTSIZE16; DRAWNUMBER1(CROSS(AL=1,0.5),L-0.1,L,0),COLORWHITE,ALIGN1,VALIGN0,FONTSIZE16; ////////////////////////////////////////////////////// N:=5;//N:=4; A1:=REF(HIGH,N)=HHV(HIGH,3*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILTER(C1,N);//{高點(diǎn)} A2:=REF(LOW,N)=LLV(LOW,3*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N);//{低點(diǎn)} E1:=(REF(LLV(LOW,2*N),1)+REF(HHV(HIGH,2*N),1))/2; E2:=(HIGH+LOW)/2; H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1; L1:=(D2 AND NOT((D1 AND E1<E2))),NODRAW; H2:=D1 AND NOT((D2 AND E1>=E2)); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(LOW,X1)+1);//LLVBARS(IF(L1,LOW,N000),X1)+1,NODRAW; G1:=F1>REF(F1,1);//DRAWTEXT(X1,L,'X1'); I1:=BACKSET(G1,1);//DRAWTEXT(F1,H,'F1'); LD:=I1>REF(I1,1);//{過(guò)濾后低點(diǎn)} L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(H,X2)+1); G2:=F2>REF(F2,1);//DRAWTEXT(HD,H*1.01,'HD'); I2:=BACKSET(G2,1);//DRAWTEXT(LD,L*0.99,'LD'); HD:=I2>REF(I2,1);//{過(guò)濾后高點(diǎn)} DD1:=VALUEWHEN(LD,L); GD1:=VALUEWHEN(HD,H); CZ1:= ABS(GD1-REF(DD1,1));//高到低點(diǎn)差價(jià); CZ2:= ABS(DD1-REF(GD1,1));//低到高點(diǎn)差價(jià); CJ1:=50<ABS(GD1-REF(DD1,1));//高到低點(diǎn)差超限; CJ2:=50<ABS(DD1-REF(GD1,1));//低到高低點(diǎn)差超限; ABA:=BACKSET(ISLASTBAR,SUMBARS(HD||LD,3)); DRAWLINE1(LD&&ABA,L,HD&&ABA,H,0),LINETHICK2,COLORLIGHTGREY;//黃色折線 DRAWLINE1(HD&&ABA,H,LD&&ABA,L,0),LINETHICK2,COLORLIGHTGREY;//藍(lán)色折線 DRAWTEXT(LD&&ABA ,L,'●'),COLORWHITE,FONTSIZE20,VALIGN1;//下面 DRAWTEXT(HD&&ABA ,H,'●'),COLORWHITE,FONTSIZE20,VALIGN1;//上面 /////////////////////////////////////////////////////////////////以下為上升回調(diào)支撐位 Q:=BARSLAST(HD)<BARSLAST(LD)&&ISLASTBAR; P:=BACKSET(ISLASTBAR&&BARSLAST(HD)<BARSLAST(LD),BARSLAST(HD)+1); M:=BACKSET(ISLASTBAR,BARSLAST(HD)+1); QQ:=REFX(BARSLAST(HD)>BARSLAST(LD)&&ISLASTBAR,20); PP:=BACKSET(ISLASTBAR&&BARSLAST(HD)>BARSLAST(LD),BARSLAST(LD)+1); MM:=BACKSET(ISLASTBAR,BARSLAST(LD)+1); AA:=EMA(C,5) > EMA(C,20); BB:=EMA(C,5) < EMA(C,20); CC:= EMA(C,5) > EMA(C,10); CC1:=EMA(C,5) < EMA(C,10); DD:=CLOSE<OPEN; BBB:=BACKSET(ISLASTBAR,SUMBARS(HD||LD,3)); AAA:=BACKSET(ISLASTBAR,SUMBARS(HD||LD,1)); CCC:=BACKSET(ISLASTBAR,SUMBARS(HD||LD,2)); A:=REFX1(BARSLAST(HD)<BARSLAST(LD),0);//10000 236壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD))+(VALUEWHEN(HD&&BBB,H)-REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)))*0.236,NULL),PRECIS0,COLORWHITE,NODRAW;//抬頭T2 382壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD))+(VALUEWHEN(HD&&BBB,H)-REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)))*0.382,NULL),PRECIS0,COLORGREEN,NODRAW;//抬頭T2 500壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD))+(VALUEWHEN(HD&&BBB,H)-REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)))*0.500,NULL),PRECIS0,COLORWHITE,NODRAW;//抬頭T2 618壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD))+(VALUEWHEN(HD&&BBB,H)-REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)))*0.618,NULL),PRECIS0,RGB(0,128,255),NODRAW;//抬頭T3 691壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD))+(VALUEWHEN(HD&&BBB,H)-REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)))*0.691,NULL),PRECIS0,COLORMAGENTA,NODRAW;//抬頭T3 764壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD))+(VALUEWHEN(HD&&BBB,H)-REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)))*0.764,NULL),PRECIS0,RGB(255,128,0),NODRAW;//抬頭T4 賣壓:IF(NOT(A)&&AAA,VALUEWHEN(HD&&BBB,H),NULL),PRECIS0,COLORRED,NODRAW;//抬頭T5 買壓:IF(NOT(A)&&AAA,REF(VALUEWHEN(LD&&BBB,L),BARSLAST(HD)),NULL),PRECIS0,COLORGREEN,NODRAW;//抬頭T1 236支:IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-(REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-VALUEWHEN(LD&&BBB,L))*0.236,NULL),PRECIS0,COLORRED,NODRAW; 382支:IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-(REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-VALUEWHEN(LD&&BBB,L))*0.382,NULL),PRECIS0,COLORGREEN,NODRAW; 500支:IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-(REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-VALUEWHEN(LD&&BBB,L))*0.500,NULL),PRECIS0,COLORWHITE,NODRAW; 618支:IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-(REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-VALUEWHEN(LD&&BBB,L))*0.618,NULL),PRECIS0,RGB(0,128,255),NODRAW; 691支:IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-(REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-VALUEWHEN(LD&&BBB,L))*0.691,NULL),PRECIS0,COLORMAGENTA,NODRAW; 764支:IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-(REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD))-VALUEWHEN(LD&&BBB,L))*0.764,NULL),PRECIS0,RGB(255,128,0),NODRAW; 賣點(diǎn):IF(A&&AAA,REF(VALUEWHEN(HD&&BBB,H),BARSLAST(LD)),NULL),PRECIS0,COLORGREEN,NODRAW; 買點(diǎn):IF(A&&AAA,VALUEWHEN(LD&&BBB,L),NULL),PRECIS0,COLORRED,NODRAW; DRAWNUMBER(REFX(Q,20),REFX1(236支,10000),REFX1(236支-C,10000),0,COLORYELLOW),ALIGN0,VALIGN1,FONTSIZE30;//000 DRAWNUMBER(REFX(Q,20),REFX1(382支,10000),REFX1(382支-C,10000),0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(Q,20),REFX1(500支,10000),REFX1(500支-C,10000),0,COLORWHITE ),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(Q,20),REFX1(618支,10000),REFX1(618支-C,10000),0,RGB(0,128,255)),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(Q,20),REFX1(691支,10000),REFX1(691支-C,10000),0,COLORMAGENTA),ALIGN0,VALIGN1,FONTSIZE30;//618 DRAWNUMBER(REFX(Q,20),REFX1(764支,10000),REFX1(764支-C,10000),0,RGB(255,128,0)),ALIGN0,VALIGN1,FONTSIZE30;//691 DRAWNUMBER(REFX(Q,20),REFX1(賣點(diǎn),10000),REFX1(賣點(diǎn)-C,10000),0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//764 DRAWNUMBER(REFX(Q,20),REFX1(買點(diǎn),10000),REFX1(買點(diǎn)-C,10000),0,COLORRED),ALIGN0,VALIGN1,FONTSIZE30;//100 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////以下為下降反彈壓力位 DRAWNUMBER(QQ,REFX1(236壓,10000),REFX1(C-236壓,10000),0,COLORYELLOW),ALIGN0,VALIGN1,FONTSIZE30;//000 DRAWNUMBER(QQ,REFX1(382壓,10000),REFX1(C-382壓,10000),0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(QQ,REFX1(500壓,10000),REFX1(C-500壓,10000),0,COLORWHITE ),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(QQ,REFX1(618壓,10000),REFX1(C-618壓,10000),0,RGB(0,128,255)),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(QQ,REFX1(691壓,10000),REFX1(C-691壓,10000),0,COLORMAGENTA),ALIGN0,VALIGN1,FONTSIZE30;//618 DRAWNUMBER(QQ,REFX1(764壓,10000),REFX1(C-764壓,10000),0,RGB(255,128,0)),ALIGN0,VALIGN1,FONTSIZE30;//691 DRAWNUMBER(QQ,REFX1(賣壓,10000),REFX1(C-賣壓,10000),0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//764 DRAWNUMBER(QQ,REFX1(買壓,10000),REFX1(C-買壓,10000),0,COLORRED),ALIGN0,VALIGN1,FONTSIZE30;//100 買賣差值.:=賣點(diǎn)-買點(diǎn),COLORMAGENTA,NODRAW,PRECIS0; DRAWNUMBER(REFX(ISLASTBAR,25),REFX(賣點(diǎn),25),REFX(賣點(diǎn),25),0,COLORGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(236支,25),REFX(236支,25),0,COLORYELLOW),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(382支,25),REFX(382支,25),0,COLORGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(500支,25),REFX(500支,25),0,COLORWHITE),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(618支,25),REFX(618支,25),0,RGB(0,128,255)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(691支,25),REFX(691支,25),0,COLORMAGENTA),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(764支,25),REFX(764支,25),0,RGB(255,128,0)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(ISLASTBAR,25),REFX(買點(diǎn),25),REFX(買點(diǎn),25),0,COLORRED),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWTEXT(REFX(ISLASTBAR,25),REFX(賣點(diǎn),25),' 賣支'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T4//61.8 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(236支,25),' 236'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T3//50 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(382支,25),' 382'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(500支,25),' 500'),COLORMAGENTA,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(618支,25),' 618'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(ISLASTBAR,25),REFX(691支,25),' 691'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T5//100 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(764支,25),' 764'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(ISLASTBAR,25),REFX(買點(diǎn),25),' 買支'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T5//100 % 買賣差值:=賣壓-買壓,COLORMAGENTA,NODRAW,PRECIS0; DRAWNUMBER(REFX(ISLASTBAR,25),REFX(賣壓,25),REFX(賣壓,25),0,COLORGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(236壓,25),REFX(236壓,25),0,COLORYELLOW),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(382壓,25),REFX(382壓,25),0,COLORLIGHTGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(500壓,25),REFX(500壓,25),0,COLORWHITE),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(618壓,25),REFX(618壓,25),0,RGB(0,128,255)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(691壓,25),REFX(691壓,25),0,COLORMAGENTA),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(764壓,25),REFX(764壓,25),0,RGB(255,128,0)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(ISLASTBAR,25),REFX(買壓,25),REFX(買壓,25),0,COLORRED),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWTEXT(REFX(ISLASTBAR,25),REFX(賣壓,25),' 賣壓'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T4//61.8 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(236壓,25),' 236'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T3//50 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(382壓,25),' 382'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(500壓,25),' 500'),COLORMAGENTA,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(618壓,25),' 618'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(ISLASTBAR,25),REFX(691壓,25),' 691'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T5//100 % DRAWTEXT(REFX(ISLASTBAR,25),REFX(764壓,25),' 764'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(ISLASTBAR,25),REFX(買壓,25),' 買壓'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T5//100 %
MA5:MA(CLOSE,8); MA10:MA(CLOSE,89); MA20:MA(CLOSE,144); N1:=0; T:=150; TT:=3; N:=0; CURRBARSCOUNT:=REFX1(BARPOS,10000)-BARPOS+1; 高:=REF(HHV(H,T),TT); 低:=REF(LLV(L,T),TT); H1:=高-(高-低)*0.191; H2:=高-(高-低)*0.382; H3:=高-(高-低)*0.5; H4:=高-(高-低)*0.618; H5:=高-(高-低)*0.809; H6:=高-(高-低)*1.272; H7:=高-(高-低)*1.618; 頂:REFX1(高,10000),COLORFFFF00; 一:REFX1(H1,10000),DOT,COLORYELLOW; 二:REFX1(H2,10000),DOT,COLORMAGENTA; 三:REFX1(H3,10000),COLOR00FFFF; 四:REFX1(H4,10000),DOT,COLORMAGENTA; 五:REFX1(H5,10000),DOT,COLORYELLOW; 六:REFX1(H6,10000),DOT,COLORMAGENTA; 七:REFX1(H7,10000),DOT,COLORYELLOW; 底:REFX1(低,10000),COLOR00FF00; TT3:=(CURRBARSCOUNT=5); TT4:=(CURRBARSCOUNT=5+3); DRAWNUMBER1(TT3 AND 1,頂,頂,2),COLOR999900,ALIGN0; DRAWTEXT(TT4 AND 1,頂,'高'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,一,一,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,一,'191'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,二,二,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,二,'382'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,三,三,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,三,'1/2'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,四,四,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,四,'618'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,五,五,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,五,'809'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,六,六,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,六,'1.272'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,七,七,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,七,'1.618'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,底,底,3),COLOR999900,ALIGN0; DRAWTEXT(TT4 AND 1,底,'低'),COLOR208FFF; NN:=4;//5 HH.:=H>HV(H,NN); NH:=BARSLAST(HH.)+1; LL.:=L<LV(L,NN); NL:=BARSLAST(LL.)+1; AH:=BACKSET(COUNT(LL.,NH)&&LL.,NH); AL:=BACKSET(COUNT(HH.,NL)&&HH.,NL); DRAWNUMBER1(CROSS(AH=1,0.5),H+0.1,H,0),COLORYELLOW,ALIGN1,FONTSIZE16; DRAWNUMBER1(CROSS(AL=1,0.5),L-0.1,L,0),COLORWHITE,ALIGN1,VALIGN0,FONTSIZE16; ////////////////////////////////////////////////////// N:=5;//N:=4; A1:=REF(HIGH,N)=HHV(HIGH,3*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILTER(C1,N);//{高點(diǎn)} A2:=REF(LOW,N)=LLV(LOW,3*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N);//{低點(diǎn)} E1:=(REF(LLV(LOW,2*N),1)+REF(HHV(HIGH,2*N),1))/2; E2:=(HIGH+LOW)/2; H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1; L1:=(D2 AND NOT((D1 AND E1<E2))),NODRAW; H2:=D1 AND NOT((D2 AND E1>=E2)); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(LOW,X1)+1);//LLVBARS(IF(L1,LOW,N000),X1)+1,NODRAW; G1:=F1>REF(F1,1);//DRAWTEXT(X1,L,'X1'); I1:=BACKSET(G1,1);//DRAWTEXT(F1,H,'F1'); LD:=I1>REF(I1,1);//{過(guò)濾后低點(diǎn)} L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(H,X2)+1); G2:=F2>REF(F2,1);//DRAWTEXT(HD,H*1.01,'HD'); I2:=BACKSET(G2,1);//DRAWTEXT(LD,L*0.99,'LD'); HD:=I2>REF(I2,1);//{過(guò)濾后高點(diǎn)} DD1:=VALUEWHEN(LD,L); GD1:=VALUEWHEN(HD,H); CZ1:= ABS(GD1-REF(DD1,1));//高到低點(diǎn)差價(jià); CZ2:= ABS(DD1-REF(GD1,1));//低到高點(diǎn)差價(jià); CJ1:=50<ABS(GD1-REF(DD1,1));//高到低點(diǎn)差超限; CJ2:=50<ABS(DD1-REF(GD1,1));//低到高低點(diǎn)差超限; ABA:=BACKSET(ISLASTBAR,SUMBARS(HD||LD,3)); DRAWLINE1(LD&&ABA,L,HD&&ABA,H,0),LINETHICK2,COLORLIGHTGREY;//黃色折線 DRAWLINE1(HD&&ABA,H,LD&&ABA,L,0),LINETHICK2,COLORLIGHTGREY;//藍(lán)色折線 DRAWTEXT(LD&&ABA ,L,'●'),COLORWHITE,FONTSIZE20,VALIGN1;//下面 DRAWTEXT(HD&&ABA ,H,'●'),COLORWHITE,FONTSIZE20,VALIGN1;//上面 /////////////////////////////////////////////////////////////////以下為上升回調(diào)支撐位 Q:=BARSLAST(HD)<BARSLAST(LD)&&ISLASTBAR; P:=BACKSET(ISLASTBAR&&BARSLAST(HD)<BARSLAST(LD),BARSLAST(HD)+1); M:=BACKSET(ISLASTBAR,BARSLAST(HD)+1); QQ:=REFX(BARSLAST(HD)>BARSLAST(LD)&&ISLASTBAR,20); PP:=BACKSET(ISLASTBAR&&BARSLAST(HD)>BARSLAST(LD),BARSLAST(LD)+1); MM:=BACKSET(ISLASTBAR,BARSLAST(LD)+1); AA:=EMA(C,5) > EMA(C,20); BB:=EMA(C,5) < EMA(C,20); CC:= EMA(C,5) > EMA(C,10); CC1:=EMA(C,5) < EMA(C,10); DD:=CLOSE<OPEN; BBB:=1; AAA:=1; CCC:=1; A:=REFX1(BARSLAST(HD)<BARSLAST(LD),0);//10000 236支:IF(A&&AAA,VALUEWHEN(HD&&BBB,H)-(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.236,NULL),PRECIS0,COLORRED,NODRAW; 382支:IF(A&&AAA,VALUEWHEN(HD&&BBB,H)-(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.382,NULL),PRECIS0,COLORGREEN,NODRAW; 500支:IF(A&&AAA,VALUEWHEN(HD&&BBB,H)-(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.500,NULL),PRECIS0,COLORWHITE,NODRAW; 618支:IF(A&&AAA,VALUEWHEN(HD&&BBB,H)-(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.618,NULL),PRECIS0,RGB(0,128,255),NODRAW; 691支:IF(A&&AAA,VALUEWHEN(HD&&BBB,H)-(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.691,NULL),PRECIS0,COLORMAGENTA,NODRAW; 764支:IF(A&&AAA,VALUEWHEN(HD&&BBB,H)-(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.764,NULL),PRECIS0,RGB(255,128,0),NODRAW; 賣點(diǎn):IF(A&&AAA,VALUEWHEN(HD&&BBB,H),NULL),PRECIS0,COLORGREEN,NODRAW; 買點(diǎn):IF(A&&AAA,VALUEWHEN(LD&&BBB,L),NULL),PRECIS0,COLORRED,NODRAW; 買賣差值.:=賣點(diǎn)-買點(diǎn),COLORMAGENTA,NODRAW,PRECIS0; K1:=BACKSET(ISLASTBAR,SUMBARS(HD||LD,1)+1); CC:=REFX1(C,10000); DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(賣點(diǎn),20),REFX(賣點(diǎn),20)-CC,0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//000 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(236支,20),REFX(236支,20)-CC,0,COLORYELLOW),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(382支,20),REFX(382支,20)-CC,0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(500支,20),REFX(500支,20)-CC,0,COLORWHITE),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(618支,20),REFX(618支,20)-CC,0,RGB(0,128,255)),ALIGN0,VALIGN1,FONTSIZE30;//618 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(691支,20),REFX(691支,20)-CC,0,COLORMAGENTA),ALIGN0,VALIGN1,FONTSIZE30;//691 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(764支,20),REFX(764支,20)-CC,0,RGB(255,128,0)),ALIGN0,VALIGN1,FONTSIZE30;//764 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(買點(diǎn),20),REFX(買點(diǎn),20)-CC,0,COLORRED),ALIGN0,VALIGN1,FONTSIZE30;//100 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(賣點(diǎn),25),REFX(賣點(diǎn),25),0,COLORGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(236支,25),REFX(236支,25),0,COLORYELLOW),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(382支,25),REFX(382支,25),0,COLORGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(500支,25),REFX(500支,25),0,COLORWHITE),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(618支,25),REFX(618支,25),0,RGB(0,128,255)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(691支,25),REFX(691支,25),0,COLORMAGENTA),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(764支,25),REFX(764支,25),0,RGB(255,128,0)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(買點(diǎn),25),REFX(買點(diǎn),25),0,COLORRED),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格//上升 DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(賣點(diǎn),25),' 賣支'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T4//61.8 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(236支,25),' 236'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T3//50 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(382支,25),' 382'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(500支,25),' 500'),COLORMAGENTA,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(618支,25),' 618'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(691支,25),' 691'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T5//100 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(764支,25),' 764'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(買點(diǎn),25),' 買支'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T5//100 % 236壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L)+(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.236,NULL),PRECIS0,COLORWHITE,NODRAW;//抬頭T2 382壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L)+(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.382,NULL),PRECIS0,COLORGREEN,NODRAW;//抬頭T2 500壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L)+(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.500,NULL),PRECIS0,COLORWHITE,NODRAW;//抬頭T2 618壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L)+(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.618,NULL),PRECIS0,RGB(0,128,255),NODRAW;//抬頭T3 691壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L)+(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.691,NULL),PRECIS0,COLORMAGENTA,NODRAW;//抬頭T3 764壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L)+(VALUEWHEN(HD&&BBB,H)-VALUEWHEN(LD&&BBB,L))*0.764,NULL),PRECIS0,RGB(255,128,0),NODRAW;//抬頭T4 賣壓:IF(NOT(A)&&AAA,VALUEWHEN(HD&&BBB,H),NULL),PRECIS0,COLORRED,NODRAW;//抬頭T5 買壓:IF(NOT(A)&&AAA,VALUEWHEN(LD&&BBB,L),NULL),PRECIS0,COLORGREEN,NODRAW;//抬頭T1 買賣差值:=賣壓-買壓,COLORMAGENTA,NODRAW,PRECIS0; DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(賣壓,20),REFX(賣壓,20)-CC,0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//000 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(236壓,20),REFX(236壓,20)-CC,0,COLORYELLOW),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(382壓,20),REFX(382壓,20)-CC,0,COLORGREEN),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(500壓,20),REFX(500壓,20)-CC,0,COLORWHITE),ALIGN0,VALIGN1,FONTSIZE30;//500 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(618壓,20),REFX(618壓,20)-CC,0,RGB(0,128,255)),ALIGN0,VALIGN1,FONTSIZE30;//618 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(691壓,20),REFX(691壓,20)-CC,0,COLORMAGENTA),ALIGN0,VALIGN1,FONTSIZE30;//691 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(764壓,20),REFX(764壓,20)-CC,0,RGB(255,128,0)),ALIGN0,VALIGN1,FONTSIZE30;//764 DRAWNUMBER(REFX(K1>REF(K1,1),20),REFX(買壓,20),REFX(買壓,20)-CC,0,COLORRED),ALIGN0,VALIGN1,FONTSIZE30;//100 DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(賣壓,25),REFX(賣壓,25),0,COLORGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(236壓,25),REFX(236壓,25),0,COLORYELLOW),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(382壓,25),REFX(382壓,25),0,COLORLIGHTGREEN),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(500壓,25),REFX(500壓,25),0,COLORWHITE),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(618壓,25),REFX(618壓,25),0,RGB(0,128,255)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(691壓,25),REFX(691壓,25),0,COLORMAGENTA),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(764壓,25),REFX(764壓,25),0,RGB(255,128,0)),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWNUMBER(REFX(K1>REF(K1,1),25),REFX(買壓,25),REFX(買壓,25),0,COLORRED),ALIGN2,VALIGN1,FONTSIZE30;//左邊價(jià)格// DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(賣壓,25),' 賣壓'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T4//61.8 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(236壓,25),' 236'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T3//50 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(382壓,25),' 382'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(500壓,25),' 500'),COLORMAGENTA,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T2//38.2 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(618壓,25),' 618'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(691壓,25),' 691'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T5//100 % DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(764壓,25),' 764'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE30;//文字左邊//T1//0 %,FONTSIZE16 DRAWTEXT(REFX(K1>REF(K1,1),25),REFX(買壓,25),' 買壓'),COLORWHITE,ALIGN0,VALIGN1,FONTSIZE27;//文字左邊//T5//100 %
HH:=HHV(H,30); MA5:MA(CLOSE,8); MA10:MA(CLOSE,89); MA20:MA(CLOSE,144); N1:=0; T:=150; TT:=3; N:=0; CURRBARSCOUNT:=REFX1(BARPOS,10000)-BARPOS+1; 高:=REF(HHV(H,T),TT); 低:=REF(LLV(L,T),TT); H1:=高-(高-低)*0.191; H2:=高-(高-低)*0.382; H3:=高-(高-低)*0.5; H4:=高-(高-低)*0.618; H5:=高-(高-低)*0.809; H6:=高-(高-低)*1.272; H7:=高-(高-低)*1.618; 頂:REFX1(高,10000),COLORFFFF00; 一:REFX1(H1,10000),DOT,COLORYELLOW; 二:REFX1(H2,10000),DOT,COLORMAGENTA; 三:REFX1(H3,10000),COLOR00FFFF; 四:REFX1(H4,10000),DOT,COLORMAGENTA; 五:REFX1(H5,10000),DOT,COLORYELLOW; 六:REFX1(H6,10000),DOT,COLORMAGENTA; 七:REFX1(H7,10000),DOT,COLORYELLOW; 底:REFX1(低,10000),COLOR00FF00; TT3:=(CURRBARSCOUNT=5); TT4:=(CURRBARSCOUNT=5+3); DRAWNUMBER1(TT3 AND 1,頂,頂,2),COLOR999900,ALIGN0; DRAWTEXT(TT4 AND 1,頂,'高'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,一,一,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,一,'191'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,二,二,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,二,'382'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,三,三,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,三,'1/2'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,四,四,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,四,'618'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,五,五,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,五,'809'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,六,六,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,六,'1.272'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,七,七,2),COLOR999999,ALIGN0; DRAWTEXT(TT4 AND 1,七,'1.618'),COLOR208FFF; DRAWNUMBER1(TT3 AND 1,底,底,3),COLOR999900,ALIGN0; DRAWTEXT(TT4 AND 1,底,'低'),COLOR208FFF; {切線趨勢(shì)} DIF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIF,9); MACD:=(DIF-DEA)*2,COLORSTICK; VAR1:=CLOSE-LOW; VAR2:=HIGH-LOW; VAR3:=CLOSE-HIGH; VAR4:=IF(HIGH>LOW,(VAR1/VAR2+VAR3/VAR2)*VOL,0); HPTP:=SUM(VAR4,10)/10000,COLORSTICK; TKXL:=(DIF-DEA)*2; XVYO:=TKXL>REF(TKXL,1); G:=MA(C,5); D:=MA(C,10); HH:=REF(H,5)=HHV(H,11); LL:=REF(L,5)=LLV(L,11); FG01:=BACKSET(HH,6)>BACKSET(HH,5); FD01:=BACKSET(LL,6)>BACKSET(LL,5); FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01,IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0)); FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01,IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0)); FG0:=FG02 AND H=HHV(H,BARSLAST(FD02)); FD0:=FD02 AND L=LLV(L,BARSLAST(FG02)); GQ:=L>REF(H,1) AND DAY<>REF(DAY,1); DQ:=H<REF(L,1) AND DAY<>REF(DAY,1); FGH:=REF(H,BARSLAST(FG0)); FGL:=REF(L,BARSLAST(FG0)); FGH1:=REF(H,BARSLAST(FG0)+1); FGL1:=REF(L,BARSLAST(FG0)+1); FGL2:=REF(L,BARSLAST(FG0)+2); FDH2:=REF(H,BARSLAST(FD0)+2); FDH:=REF(H,BARSLAST(FD0)); FDL:=REF(L,BARSLAST(FD0)); FDH1:=REF(H,BARSLAST(FD0)+1); FDL1:=REF(L,BARSLAST(FD0)+1); FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1)); FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1)); FG1:=FGH>FDZH AND FG0; FD1:=FDL<FGZL AND FD0; FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL; FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH; BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1)); BHG:=COUNT(BH0,IF(BARSLAST(FD0)=0,1,BARSLAST(FD0))); BHD:=COUNT(BH0,IF(BARSLAST(FD0)=0,1,BARSLAST(FD0))); BGQ:=COUNT(GQ,IF(BARSLAST(FD0)=0,1,BARSLAST(FD0))); BDQ:=COUNT(DQ,IF(BARSLAST(FD0)=0,1,BARSLAST(FD0))); BK0:=IF(BHG>0,BHG+2,IF(BHD,BHD+2,3)); BK1:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0)); G1X:=(FG AND BARSLAST(FD)>BK1); D1X:=(FD AND BARSLAST(FG)>BK1); G1:=(FG0 AND REF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X)) OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X))); D1:=(FD0 AND REF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X)) OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X))); G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,BARSLAST(D1))); D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,BARSLAST(G1))); G2:=G1 AND H=HHV(G1H,BARSLAST(D1)+1) AND H>REF(H,1) AND BARSLAST(D1)>BARSLAST(G1); D2:=D1 AND L=LLV(D1L,BARSLAST(G1)+1) AND L<REF(L,1) AND BARSLAST(G1)>BARSLAST(D1); NN:=G2 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2)); UU:=D2 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2)) AND BARSLAST(G2)>BARSLAST(D2)); L1:=CROSS(BACKSET(NN,BARSLAST(UU)+1),0.5),NODRAW; H1:=CROSS(BACKSET(UU,BARSLAST(NN)+1),0.5),NODRAW; DRAWLINE1(L1,L,H1,H,0),COLORYELLOW,DOT; DRAWLINE1(H1,H,L1,L,0),COLORWHITE,DOT; HH1:=VALUEWHEN(H1,H),NODRAW; HH2:=VALUEWHEN(H1,REF(HH1,1)),NODRAW; HN1:=IF(HH2>HH1,2,1),NODRAW; DRAWLINE1(CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,HN1)),0.5),H,CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,1)),0.5),H,1),LINETHICK1,COLORGREEN; LL1:=VALUEWHEN(L1,L),NODRAW; LL2:=VALUEWHEN(L1,REF(LL1,1)),NODRAW; LN1:=IF(LL2<LL1,2,1),NODRAW; DRAWLINE1(CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,LN1)),0.5),L,CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,1)),0.5),L,1),LINETHICK1,COLORRED; /* 當(dāng)前一低C高于前二低A時(shí),中間必有一個(gè)高點(diǎn)B,此時(shí)求上升趨勢(shì)的預(yù)測(cè)點(diǎn)位 D=C+(B-A)*0.618,D1=C+(B-A)*1,D2=C+(B-A)*1.382,在C點(diǎn)向上畫(huà)垂直線段, 在垂直線段畫(huà)水平線段并標(biāo)注D,D1,D2點(diǎn)數(shù)字; 下降趨勢(shì)同理 2:在最近的兩個(gè)高點(diǎn)和低點(diǎn)上畫(huà)水平虛線 */ MM:=L1&&L>REF(L,SUMBARS(L1,2)-1); AA:=BACKSET(ISLASTBAR,SUMBARS(MM,1)); DM:=L+(REF(H,BARSLAST(H1))-REF(L,SUMBARS(L1,2)-1))*0.618; DM1:=L+(REF(H,BARSLAST(H1))-REF(L,SUMBARS(L1,2)-1))*1; DM2:=L+(REF(H,BARSLAST(H1))-REF(L,SUMBARS(L1,2)-1))*1.382; DRAWSL(MM&&AA,DM,0,10,0,COLORRED); DRAWSL(MM&&AA,DM1,0,10,0,COLORRED); DRAWSL(MM&&AA,DM2,0,10,0,COLORRED); DRAWNUMBER(MM&&AA,DM,DM,0,COLORRED); DRAWNUMBER(MM&&AA,DM1,DM1,0,COLORRED); DRAWNUMBER(MM&&AA,DM2,DM2,0,COLORRED); MM1:=H1&&H<REF(H,SUMBARS(H1,2)-1); BB:=BACKSET(ISLASTBAR,SUMBARS(MM1,1)); DDT:=H+(REF(L,BARSLAST(L1))-REF(H,SUMBARS(H1,2)-1))*0.618; DDT1:=H+(REF(L,BARSLAST(L1))-REF(H,SUMBARS(H1,2)-1))*1; DDT2:=H+(REF(L,BARSLAST(L1))-REF(H,SUMBARS(H1,2)-1))*1.382; DDT3:=H+(REF(L,BARSLAST(L1))-REF(H,SUMBARS(H1,2)-1))*1.618; DRAWSL(MM1&&BB,DDT,0,10,0,COLORGREEN); DRAWSL(MM1&&BB,DDT1,0,10,0,COLORGREEN); DRAWSL(MM1&&BB,DDT2,0,10,0,COLORGREEN); DRAWNUMBER(MM1&&BB,DDT,DDT,0,COLORGREEN); DRAWNUMBER(MM1&&BB,DDT1,DDT1,0,COLORGREEN); DRAWNUMBER(MM1&&BB,DDT2,DDT2,0,COLORGREEN); CZ:=ABS(REF(L,BARSLAST(L1))-REF(H,SUMBARS(H1,1)-1)); LA:=MIN(REF(H,SUMBARS(H1,1)-1),REF(L,BARSLAST(L1))); A1:=LA+CZ*0.618; A2:=LA+CZ*0.382; DRAWSL(ISLASTBAR,LA,0,-10,0,COLORMAGENTA); DRAWSL(ISLASTBAR,A1,0,-10,0,COLORMAGENTA); DRAWSL(ISLASTBAR,A2,0,-10,0,COLORMAGENTA); DRAWNUMBER(ISLASTBAR,LA,LA,0,COLORMAGENTA); DRAWNUMBER(ISLASTBAR,A1,A1,0,COLORMAGENTA); DRAWNUMBER(ISLASTBAR,A2,A2,0,COLORMAGENTA); 高:=HHV(H,120),NODRAW; 低:=LLV(L,120),NODRAW; 第一目標(biāo):=SQRT(((高-低)*0.5+低)*((高-低)*0.382+低) ); 第二目標(biāo):=SQRT(((高-低)*0.618+低)*((高-低)*0.764+低) ); DRAWSL(ISLASTBAR,高,0,-120,0,COLORRED); DRAWSL(ISLASTBAR,低,0,-120,0,COLORGREEN); DRAWSL(ISLASTBAR,第一目標(biāo),0,-120,0,COLORYELLOW); DRAWSL(ISLASTBAR,第二目標(biāo),0,-120,0,COLORYELLOW); DRAWNUMBER(ISLASTBAR,高,高,0,COLORRED),ALIGN0; DRAWNUMBER(ISLASTBAR,低,低,0,COLORGREEN),ALIGN0; DRAWNUMBER(ISLASTBAR,第一目標(biāo),第一目標(biāo),0,COLORYELLOW),ALIGN0; DRAWNUMBER(ISLASTBAR,第二目標(biāo),第二目標(biāo),0,COLORYELLOW),ALIGN0; M:=20; 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 NN>0,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;//只設(shè)置前面第M-1個(gè) FD01:=BACKSET(L1,NNN+1)>BACKSET(L1,NNN) ,NODRAW; FG02:=FG01=FD01 AND G>D,NODRAW; FD02:=FG01=FD01 AND G<D,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; //高低點(diǎn)間周期 GT:=BARSLAST(FG0),NODRAW; DT:=BARSLAST(FD0),NODRAW; //第一次處理高低點(diǎn)間多余的點(diǎn) LLLL:=DT=0 AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW; FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW; FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT 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 H<REF(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 L>REF(L,REF(DT,1)+1),1,0),NODRAW; //再次周期 GT1:=BARSLAST(FG11<>1 AND FG1<>1 AND FG0),NODRAW; DT1:=BARSLAST(FD11<>1 AND FD1<>1 AND FD0),NODRAW; FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+M-2),DT1+1),NODRAW; FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 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 DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+M-1) AND H>HHV(H,REF(GT1,1)+M-1),1,0),NODRAW; FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+M-2),GT1+1),NODRAW; FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 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 GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND L>LLV(L,REF(DT1,1)+M-1),1,0),NODRAW; TTTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW; HHHHHH:=REF(LLV(L,10),DT1),NODRAW; //前長(zhǎng)后短; FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1) ,1,0),NODRAW; FD21:=IF(DT1=0 AND GT1<4 AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW; //前短后長(zhǎng),前低后高(去低); FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 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 DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW; //前短后長(zhǎng),去2; FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 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 GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND ( REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW; //前短后長(zhǎng),去3; FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=0,NODRAW; FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 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 GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW; //做兩次高低點(diǎn)間多余的點(diǎn) GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1 AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW; DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1 AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW; FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW; FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW; FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW; FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW; GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW; DT3:=BARSLAST(DT2=0 AND FD3<>1 AND FD31<>1),NODRAW; FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW; FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW; FG41:=IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW; FD41:=IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW; HHH:=GT3=0 AND FG31<>1 AND FG3<>1,NODRAW; LLL:=DT3=0 AND FD31<>1 AND FD3<>1,NODRAW; DRAWLINE1(LLL,L,HHH,H,0),COLORYELLOW,LINETHICK1; DRAWLINE1(HHH,H,LLL,L,0),COLORGREEN,LINETHICK1; AA:=CROSS(BACKSET(ISLASTBAR,BARSLAST(HHH||LLL)+1),0.5),ICON(1,'ICO1'); BB:=CROSS(BACKSET(ISLASTBAR,SUMBARS(HHH||LLL,2)),0.5),ICON(1,'ICO1'); XX1:HHH||LLL,NODRAW; XX:IF(HHH,H,L); DRAWSL(AA&&HHH,H,0,1000,0,COLORYELLOW); DRAWSL(AA&&HHH,VALUEWHEN(LLL,L),0,1000,0,COLORYELLOW); DRAWSL(AA&&HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.382 ,0,1000,0,COLORGREEN); DRAWSL(AA&&HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.618,0,1000,0,COLORYELLOW); DRAWSL(AA&&HHH,H,0,-SUMBARS(XX1,2),0,COLORYELLOW); DRAWSL(AA&&HHH,VALUEWHEN(LLL,L),0,-SUMBARS(XX1,2),0,COLORYELLOW); DRAWSL(AA&&HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.382 ,0,-SUMBARS(XX1,2),0,COLORGREEN); DRAWSL(AA&&HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.618,0,-SUMBARS(XX1,2),0,COLORYELLOW); DRAWSL(AA&&LLL,L,0,-SUMBARS(XX1,2),0,COLORYELLOW); DRAWSL(AA&&LLL,VALUEWHEN(HHH,H),0,-SUMBARS(XX1,2),0,COLORYELLOW); DRAWSL(AA&&LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.382 ,0,-SUMBARS(XX1,2),0,COLORRED); DRAWSL(AA&&LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.618,0,-SUMBARS(XX1,2),0,COLORYELLOW); DRAWSL(AA&&LLL,L,0,1000,0,COLORYELLOW); DRAWSL(AA&&LLL,VALUEWHEN(HHH,H),0,1000,0,COLORYELLOW); DRAWSL(AA&&LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.382 ,0,1000,0,COLORRED); DRAWSL(AA&&LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.618,0,1000,0,COLORYELLOW); DRAWNUMBER(BB,REFX1(VALUEWHEN(LLL,L),10000),REFX1(VALUEWHEN(LLL,L),10000),1,COLORYELLOW); DRAWNUMBER(BB,REFX1(VALUEWHEN(HHH,H),10000),REFX1(VALUEWHEN(HHH,H),10000),1,COLORYELLOW); DRAWTEXT(BB,REFX1(VALUEWHEN(LLL,L),10000),'低'),VALIGN0,COLORYELLOW; DRAWTEXT(BB,REFX1(VALUEWHEN(HHH,H),10000),'高'),VALIGN0,COLORYELLOW; DRAWNUMBER(BB&&HHH,REFX1(VALUEWHEN(LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.382),10000),REFX1(VALUEWHEN(LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.382),10000),1,COLORRED); DRAWNUMBER(BB&&HHH,REFX1(VALUEWHEN(LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.618),10000),REFX1(VALUEWHEN(LLL,VALUEWHEN(LLL,L)+(VALUEWHEN(HHH,H)-L)*0.618),10000),1,COLORYELLOW); DRAWNUMBER(BB&&LLL,REFX1(VALUEWHEN(HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.382),10000),REFX1(VALUEWHEN(HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.382),10000),1,COLORGREEN); DRAWNUMBER(BB&&LLL,REFX1(VALUEWHEN(HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.618),10000),REFX1(VALUEWHEN(HHH,VALUEWHEN(LLL,L)+(H-VALUEWHEN(LLL,L))*0.618),10000),1,COLORYELLOW); 筆周期:=10; 半分位:=50; 畫(huà)趨勢(shì):=1; 漲停位:=50; 時(shí)間:=1; 日線:=IF(PERIOD=5,1,0); CA3:=REF(C,1)*日線; CURRBARSCOUNT:=REFX1(BARPOS,10000)-BARPOS+1; 漲停:=C/CA3>1.09; A1:=REF(H,3)=HHV(H,筆周期*3+1)*1; B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3); {高點(diǎn)} A2:=REF(L,3)=LLV(L,筆周期*3+1)*1; B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3); {低點(diǎn)} E1:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2; E2:=(H+L)/2; H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(C)=1; H2:=D1 AND NOT(D2 AND E1>=E2); L1:=D2 AND NOT(D1 AND E1=E2); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,100000),X1)+1); G1:=F1>REF(F1,1); I1:=BACKSET(G1,1); LD:=I1>REF(I1,1); L2:=LD OR BARSTATUS=2 OR BARSCOUNT(C)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2)+1); G2:=F2>REF(F2,1); I2:=BACKSET(G2,1); HD:=I2>REF(I2,1); DRAWLINE3(LD,REF(H,BARSLAST(HD)),BARSLAST(HD),HD,REF(L,BARSLAST(LD)),BARSLAST(LD),0),COLORGREEN,LINETHICK3; DRAWLINE3(HD,REF(L,BARSLAST(LD)),BARSLAST(LD),LD,REF(H,BARSLAST(HD)),BARSLAST(HD),0),COLORRED,LINETHICK3; J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1); A3:=H; B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2)); D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1); A4:=L>REF(L,REF(BARSLAST(LD),1)+1); B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1); H3:=HH OR BARSTATUS=2 OR BARSCOUNT(C)=1; X3:=REF(BARSLAST(H3),1)+1; F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3)); G3:=F3>REF(F3,1); I3:=BACKSET(G3,2); LZ:=I3>REF(I3,1); L4:=LZ OR BARSTATUS=2 OR BARSCOUNT(C)=1; X4:=REF(BARSLAST(L4),1)+1; F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4)); G4:=F4>REF(F4,1); I4:=BACKSET(G4,2); HZ:=I4>REF(I4,1); K1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HZ),BARSLAST(LZ))+1); K2:=K1>REF(K1,1); UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1); VV:=UU>REF(UU,1); WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2); XX:=WW>REF(WW,1); WWQ:=BACKSET(XX,REF(BARSLAST(LD),1)+2); XXQ:=WWQ>REF(WWQ,1); 下軌:=TRENDLINES(XX,L,VV,L)*畫(huà)趨勢(shì),COLORMAGENTA,LINETHICK1; {畫(huà)趨勢(shì)線} UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1); VV2:=UU2>REF(UU2,1); WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2); XX2:=WW2>REF(WW2,1); WW3Q:=BACKSET(XX2,REF(BARSLAST(HD),1)+2); XX3Q:=WW3Q>REF(WW3Q,1); WW4Q:=BACKSET(XX3Q,REF(BARSLAST(HD),1)+2); XX4Q:=WW4Q>REF(WW4Q,1); 上軌:=TRENDLINES(XX2,H,VV2,H)*畫(huà)趨勢(shì),COLORMAGENTA,LINETHICK1; {畫(huà)趨勢(shì)線} Q0:=BARSLAST(XX2>0); Q1:=BARSLAST(XX>0); Q2:=BARSLAST(WW2>0); Q3:=BARSLAST(VV>0); Q4:=BARSLAST(XXQ>0); Q5:=BARSLAST(XX3Q>0); Q6:=BARSLAST(XX4Q>0); 低1:REF(L,BARSLAST(VV)),LINETHICK2,COLORGREEN; 低壹:=REF(C,BARSLAST(VV)); 低壹1:=REF(C,BARSLAST(VV)+1); 高1:REF(H,BARSLAST(VV2)),LINETHICK2,COLORRED; 高壹:=REF(C,BARSLAST(VV2)); 高壹1:=REF(C,BARSLAST(VV2)+1); 低2:REF(L,BARSLAST(XX)),DOT,COLORGREEN; 低貳:=REF(C,BARSLAST(XX)); 低貳2:=REF(C,BARSLAST(XX)+1); 高2:REF(H,BARSLAST(XX2)),DOT,COLORRED; 高貳:=REF(C,BARSLAST(XX2)); 高貳2:=REF(C,BARSLAST(XX2)+1); ABC:=IF(Q5>Q4,REF(L,BARSLAST(XXQ)),0),DOT,COLORCYAN; 中位1:低1-(低1-高1)*(0.01*半分位),COLORRED; ①②③:=IF(Q5<Q4,REF(H,BARSLAST(XX3Q)),0),DOT,COLORCYAN; DRAWLINE1(J2,IF(HD,H,L),ISLASTBAR,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),DOT,COLORYELLOW,LINETHICK1; 筆:TRENDLINES(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L)),DOT,COLORYELLOW,LINETHICK1; OA幅:=(低貳-高貳2)/高貳2*100; AB幅:=(高壹-低貳2)/低貳2*100; BC幅:=(低壹-高壹1)/高壹1*100; AO幅:=(C-低壹1)/低壹1*100; D01:=(高貳-低貳2)/低貳2*100; D12:=(低壹-高貳2)/高貳2*100; D23:=(高壹-低壹1)/低壹1*100; D30:=(C-高壹1)/高壹1*100; DRAWTEXT( VV=1 AND Q0>Q1,L,'C'),COLORMAGENTA; DRAWTEXT(VV2=1 AND Q0>Q1,H,'B'),COLORMAGENTA; DRAWTEXT( XX=1 AND Q0>Q1,L,'A'),COLORMAGENTA; DRAWTEXT(XX2=1 AND Q5>Q4 ,H,'◆'),COLORMAGENTA; DRAWTEXT(XXQ=1 AND Q5>Q4 ,L,'★'),COLORMAGENTA; DRAWTEXT( VV=1 AND Q0<Q1,L,'?'),COLORMAGENTA; DRAWTEXT(VV2=1 AND Q0<Q1,H,'?'),COLORMAGENTA; DRAWTEXT(XX2=1 AND Q0<Q1,H,'?'),COLORMAGENTA; DRAWTEXT(XX=1 AND Q5<Q4,L,'◎'),COLORMAGENTA; DRAWTEXT(XX3Q=1 AND Q5<Q4,H,'☆'),COLORMAGENTA; V00:= HIGH<REF(HIGH,1) AND LOW<REF(LOW,1); V01:= HIGH<REF(HIGH,1) AND LOW>REF(LOW,1); V02:= HIGH>REF(HIGH,1) AND LOW<REF(LOW,1); V03:= HIGH>REF(HIGH,1) AND LOW>REF(LOW,1); V04:= REF(HIGH,2) < HIGH AND REF(LOW,2) < LOW AND REF(HIGH,2) > REF(HIGH,1) AND REF(LOW,2) < REF(LOW,1); V1:= COUNT(V00,3)>=1 AND LLVBARS(LOW,3) = 1 AND V03; V2:= COUNT(V00,4)>=1 AND LLVBARS(LOW,4) = 2 AND V04; V3:= COUNT(V00,4)>=1 AND COUNT(V01 OR V02,4)=1 AND LLVBARS(LOW,4) = 1 AND V03; V4:= COUNT(V00,5)>=1 AND COUNT(V01 OR V02,5)=2 AND LLVBARS(LOW,5) = 2 AND V04; XG1:= V1 OR V2 OR V3 OR V4; XG2:= C > REF(HIGH,1); XG:=XG1 AND XG2; 一陽(yáng)定勢(shì):=CROSS(C,高1) AND CROSS(C,高2) AND CROSS(C,①②③),COLORYELLOW,NODRAW; STICKLINE(一陽(yáng)定勢(shì),OPEN,CLOSE,2.8,1),COLORMAGENTA; DRAWTEXT(一陽(yáng)定勢(shì)=1,L,'一陽(yáng)定勢(shì)'),COLORYELLOW; 收斂:=ABC>0 AND ABC<低2 AND 低2<低1 AND 高2>高1 AND CROSS(C,上軌); STICKLINE(收斂,OPEN,CLOSE,2.8,1),COLORMAGENTA; DRAWTEXT(收斂=1,L,'收斂'),COLORYELLOW; 強(qiáng)勢(shì):=ABC>0 AND ABC<低2 AND 低2<低1 AND 高2<高1 AND CROSS(C,高1); STICKLINE(強(qiáng)勢(shì),OPEN,CLOSE,2.8,1),COLORMAGENTA; DRAWTEXT(強(qiáng)勢(shì)=1,L,'強(qiáng)勢(shì)'),COLORYELLOW; 三買:=(低1>高2 AND 中位1>低1 AND XG>0 AND C>O),COLORYELLOW,NODRAW; STICKLINE(三買,OPEN,CLOSE,2.8,1),COLORMAGENTA; DRAWTEXT(三買=1,L,'三買'),COLORYELLOW; 漲停線:=REF(L+(H-L)*(0.01*漲停位),BARSLAST(REFX1(BARSLAST(IF(CURRBARSCOUNT<=30*日線,漲停,0)),10000)+1=CURRBARSCOUNT)),DOT,COLORYELLOW; 漲停幅:=(L-漲停線)/漲停線*100,NODRAW; |
|
來(lái)自: 一名津人 > 《文華主圖指標(biāo)》