WR1:=((2)*(C)+H+L)/(4); WR2:=LLV(L,34); WR3:=HHV(H,34); BW:=(WR1-WR2)/(WR3-WR2); B1:=EMA(BW,8); 線性1:=EMA(B1,5)*100; 線性2:=IF(B1>EMA(B1,5),B1*1.1,B1*0.9)*100; {長(zhǎng)J}RSV1:=(BW-LLV(BW,27))/(HHV(BW,27)-LLV(BW,27))*100; K1:=SMA(RSV1,5,1); D1:=SMA(K1,5,1); 行:=3*K1-2*D1; AA1:=EMA(行,5); AA2:=REF(AA1,1); {短J}RSV2:=(BW-LLV(BW,9))/(HHV(BW,9)-LLV(BW,9))*100; K2:=SMA(RSV2,3,1); D2:=SMA(K2,3,1); 短:=EMA(3*K2-2*D2,5); 短勢(shì):=IF(PERIOD>=4,短,行),COLOR8E0000,LINETHICK3; 分:=CONST(LLV(L,90)); 百:=CONST(HHV(H,90))-分; CC比:=(C-分)/百; HH比:=(H-分)/百; LL比:=(L-分)/百; OO比:=(O-分)/百; 點(diǎn):=CONST(LLV(短勢(shì),90)); 基:=CONST(HHV(短勢(shì),90))-點(diǎn); CX:=CC比*基+點(diǎn); HX:=HH比*基+點(diǎn); LX:=LL比*基+點(diǎn); OX:=OO比*基+點(diǎn); 部低點(diǎn)預(yù)選A:=BACKSET(LLV(線性1,5)<REF(LLV(線性1,4),1),4); 部高點(diǎn)預(yù)選A:=BACKSET(HHV(線性1,5)>REF(HHV(線性1,4),1),4); 線高天:=BARSLAST(部高點(diǎn)預(yù)選A=1)+1; 線高天AA:=HHV(DRAWLINE(線高天=1,線性1,REF(線高天,1)=1,REF(線性1,1),1),2),COLOR00FFFF; 線低天:=BARSLAST(部低點(diǎn)預(yù)選A=1)+1; 線低天AA:=HHV(DRAWLINE(線低天=1,線性1,REF(線低天,1)=1,REF(線性1,1),1),2),COLORFF0000; DRAWBAND(IF(EMA(線高天AA,3)>線性1,EMA(線高天AA,3),線性1),RGB(0,20,35),線性1,RGB(128,0,128)); 局部低點(diǎn)預(yù)選:=BACKSET(LLV(短勢(shì),5)<REF(LLV(短勢(shì),4),1),4); 局部高點(diǎn)預(yù)選:=BACKSET(HHV(短勢(shì),5)>REF(HHV(短勢(shì),4),1),4); 高天:=BARSLAST(局部高點(diǎn)預(yù)選=1)+1; 高天AA:=HHV(DRAWLINE(高天=1,短勢(shì),REF(高天,1)=1,REF(短勢(shì),1),1),2),COLOR00FFFF; DRAWBAND(MA(高天AA,2),RGB(0,124,224),短勢(shì),RGB(255,196,9)); 低天:=BARSLAST(局部低點(diǎn)預(yù)選=1)+1; 低天AA:=HHV(DRAWLINE(低天=1,短勢(shì),REF(低天,1)=1,REF(短勢(shì),1),1),2),COLORFF0000; 價(jià)低點(diǎn)預(yù)選A:=BACKSET(LLV(LX,5)<REF(LLV(LX,4),1),4); 價(jià)高點(diǎn)預(yù)選A:=BACKSET(HHV(HX,5)>REF(HHV(HX,4),1),4); 價(jià)高:=BARSLAST(價(jià)高點(diǎn)預(yù)選A=1)+1; 價(jià)高AA:=HHV(DRAWLINE(價(jià)高=1,HX,REF(價(jià)高,1)=1,REF(HX,1),1),2),COLOR0099FF; 價(jià)低:=BARSLAST(價(jià)低點(diǎn)預(yù)選A=1)+1; 價(jià)低AA:=HHV(DRAWLINE(價(jià)低=1,LX,REF(價(jià)低,1)=1,REF(LX,1),1),2),COLORFFF000; 尚勢(shì):=IF(短勢(shì)>低天AA,短勢(shì),DRAWNULL)CIRCLEDOT,COLOR0000FF,LINETHICK2; 高離:=IF((短勢(shì)>=高天AA&&價(jià)高AA=REF(價(jià)高AA,1)) OR (短勢(shì)<高天AA&&價(jià)高AA>=REF(價(jià)高AA,1)),短勢(shì),DRAWNULL)CIRCLEDOT,COLOR005500,LINETHICK2; DRAWBAND(尚勢(shì),RGB(255,9,9),尚勢(shì)*0.9,RGB(255,9,9)); DRAWBAND(高離,RGB(2,96,6),高離*1.1,RGB(2,96,6)); DRAWBAND(IF(EMA(線高天AA,3)>線性1,線性1,EMA(線高天AA,3)),RGB(0,204,35),線性1,RGB(128,0,128)); 趨勢(shì)線:=3*SMA((C-LLV(L,14))/(HHV(H,14)-LLV(L,14))*100,5,1) -2*SMA(SMA((C-LLV(L,14))/(HHV(H,14)-LLV(L,14))*100,5,1),3,1),COLOR00FFFF,LINETHICK2; DRAWBAND(趨勢(shì)線,RGB(254,254,254),趨勢(shì)線*0.98,RGB(254,254,254)); DRAWICON(CROSS(趨勢(shì)線,高天AA),高天AA,1); DRAWICON(CROSS(低天AA,趨勢(shì)線),低天AA,2);{N 1 99 21} DRAWTEXT(價(jià)高AA=LLV(LLV(價(jià)高AA,N),2)&&低天AA>LLV(LLV(低天AA,N),2),LLV(低天AA,5),'背'),COLOR000000; DRAWTEXT(價(jià)低AA=HHV(HHV(價(jià)低AA,N),2)&&高天AA<HHV(HHV(高天AA,N),2),HHV(高天AA,5),'離'),COLOR223388; GJ:=MAX(C,O); L4:=LLV(GJ,4); JL:=(HHV(短勢(shì),55)-LLV(短勢(shì),55))/5; GT:=短勢(shì)>REF(短勢(shì),1) AND REF(短勢(shì),1)<REF(短勢(shì),2); AS1:=BARSLAST(REF(GT,1)); 底背離:=REF(L4,AS1+1)>CLOSE AND 短勢(shì)>REF(短勢(shì),AS1+1) AND GT; 底背:DRAWLINE(AS1=0,短勢(shì),底背離,REF(短勢(shì),AS1),0),COLORFF00FF,LINETHICK3; STICKLINE(底背離,底背,短勢(shì),0.1,0),COLORFF00FF; DRAWTEXT(底背離,REF(底背,1),' 底背離'),COLORFF00FF; H4:=HHV(GJ,4); GT2:=短勢(shì)<REF(短勢(shì),1) AND REF(短勢(shì),1)>REF(短勢(shì),2); AS2:=BARSLAST(REF(GT2,1)); 頂背離:= REF(H4,AS2+1)<H4 AND 短勢(shì)<REF(短勢(shì),AS2+1) AND GT2; 頂背:DRAWLINE(AS2=0,短勢(shì),頂背離,REF(短勢(shì),AS2),0),COLORGREEN,LINETHICK2; STICKLINE(頂背離,短勢(shì),頂背,0.1,0),COLORGREEN; DRAWTEXT(頂背離,REF(頂背,1),' 頂背離'),COLORGREEN; 當(dāng)下:CONST(短勢(shì)),COLOR8E0000; |
|
來(lái)自: 昵稱1945821 > 《指標(biāo)管理》