本帖最后由 更好 于 2012-7-11 19:04 編輯 安全線: EMA(CLOSE,55), COLORLIGREEN,LINETHICK2; VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5; A1:=(EMA(VAR1,3)+EMA(VAR1,6)+EMA(VAR1,12)+EMA(VAR1,24))/4; A2:=EMA(A1,2); A3:=EMA(A2,2); A4:=EMA(A3,2); A5:=EMA(A4,2); A6:=EMA(A5,2); A7:=EMA(A6,2); A8:EMA(VAR1,2.78)*1.028,COLORMAGENTA; A9:MA(OPEN,3.2)*1.028,COLORYELLOW,DOTLINE; A:=(3*C+H+L+O)/6; XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146*REF(A,4))/2.382,COLORMAGENTA; MAA:=MA(XJ,3),COLORYELLOW,DOTLINE; PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*REF(A,6)+3*REF(A,7)+ 2*REF(A,8)+REF(A,9))/55; A2I:=SUM(IF(C>REF(C,1),V*C,0),0); A3I:=SUM(IF(C<REF(C,1),V*C,0),0); A4I:=SUM(IF(C=REF(C,1),V*C,0),0); B1萬元:=DVOL*DCLOSE/100; B1差:=B1萬元-REF(B1萬元,1); 凈流入萬元:=(A2I-A3I-0.5*A4I),COLOR0088FF,NODRAW; PM:=MA(凈流入萬元,1); PMA:=PM/REF(PM,1)>1; PMB:=REF(PMA,1)<1 AND PMA; 密碼:=(EMA(MA(B1萬元,2),2))/100000; 二日比:=密碼/REF(密碼,1); 選股:PMB AND 密碼>REF(密碼,1) AND 二日比>1,COLORWHITE,NODRAW; 均價(jià):=AMOUNT/V/100; 均價(jià)2:=MA(均價(jià),3); 均價(jià)5:=MA(均價(jià),5); 均價(jià)10:=MA(均價(jià),10); 均價(jià)30:=MA(均價(jià),30); 突破:C>均價(jià)2 AND 均價(jià)2<REF(均價(jià)2,1) AND REF(均價(jià)2,1)<REF(均價(jià)2,2)AND REF(均價(jià)2,2)<REF(均價(jià)2,3) AND 選股,COLORYELLOW,NODRAW; 選票:REF(MA(C,5)<MA(C,10),1)AND CROSS(C,MA(C,5))AND CROSS(二日比,1.01),COLORMAGENTA,NODRAW; 高:=REF(HHV(XJ,80),3); 頂點(diǎn):REFDATE(高,DATE),COLORBROWN,NODRAW; 低:=REF(LLV(XJ,80),3); 低點(diǎn):REFDATE(低,DATE),COLORGRAY,DOTLINE; 中:(頂點(diǎn)+低點(diǎn))/2,COLORGRAY,DOTLINE; 流入:=BARSLAST(PM/REF(PM,1)<1); 入:=EMA(EMA(流入,2),2); 入MA:=MA(入,3); 流入強(qiáng)度:(入-入MA),NODRAW; STICKLINE(流入強(qiáng)度>0,中,中+流入強(qiáng)度/4,0,0),COLORRED; STICKLINE(流入強(qiáng)度<0,中,中+流入強(qiáng)度/4,0,0),COLORCYAN; STICKLINE(流入強(qiáng)度<0 AND 流入強(qiáng)度>REF(流入強(qiáng)度,1),中,中+流入強(qiáng)度/4,0,0),COLORLIRED; A05:=EMA(PJ,11),COLORWHITE; XJ金叉:REF(XJ<A05,1)AND CROSS(XJ,MAA),COLORRED,NODRAW; {資金低位金叉} OA:=VOL*C; OB:=SUM(OA,1)/SUM(VOL,1); B1:=EMA(OB,17); 資金:=(OB-B1)/OB*100; FA:=EMA(資金,5)-EMA(資金,34); AA:=EMA(FA,9); 資低金叉:(CROSS(FA,AA) AND FA<-0.1),COLORWHITE,NODRAW; DI:=EMA(C,6)-EMA(C,13),; DE:=EMA(DI,5),; MACD:=2*(DI-DE),; OA1:=BARSLAST(REF(CROSS(DI,DE),1)); 底背離:=REF(C,OA1+1)>C AND DI>REF(DI,OA1+1) AND CROSS(DI,DE); STICKLINE(底背離,中,中+流入強(qiáng)度/4,0.1,0),COLORLIRED; DRAWTEXT(底背離,中+流入強(qiáng)度/4,' 底背離'),COLORLIRED; OA2:=BARSLAST(REF(CROSS(DE,DI),1)); 頂背離:=REF(C,OA2+1)<C AND REF(DI,OA2+1)>DI AND CROSS(DE,DI); STICKLINE(頂背離,中,中+流入強(qiáng)度/4,0.1,0),COLORLIBLUE; DRAWTEXT(頂背離,中+流入強(qiáng)度/4,'頂背離'),COLORCYAN; DRAWTEXT(CROSS(85,RSI),XJ,'落袋'),COLORCYAN; {DRAWTEXT(CROSS(DE,DI) AND DI>0,中+流入強(qiáng)度/3,'死叉'),COLORCYAN;} STICKLINE(資低金叉,低點(diǎn),中,0,0),COLORWHITE; DRAWTEXT(資低金叉,低點(diǎn)+0.02,'資金叉'),COLORWHITE; STICKLINE(突破=1,C,O,2,0),COLORYELLOW; STICKLINE(選票=1,C,O,2,0),COLORMAGENTA; STICKLINE(選股=1,C,O,2,0),COLORWHITE; LX:=REF(XJ,1); ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100; KX1:=C>=O AND ZD>=50; KX2:=C<O AND ZD>=50; KX3:=C>=O AND ZD<50; KX4:=C<O AND ZD<50; STICKLINE(KX1,A8,A9,1,0),COLOR0000CC; STICKLINE(KX2,A8,A9,1,0),COLOR008888; STICKLINE(KX3,A8,A9,1,0),COLORLIRED; STICKLINE(KX4,A8,A9,1,0),COLORLICYAN,; R1:IF(A1<REF(A1,1),A1,A1),COLOR008200,LINETHICK1; Q1:IF(A1>REF(A1,1),A1,DRAWNULL),COLORRED,LINETHICK1; R2:IF(A2<REF(A2,1),A2,DRAWNULL),COLOR008C00,LINETHICK1; Q2:IF(A2>REF(A2,1),A2,DRAWNULL),COLOR000085,LINETHICK1; R3:IF(A3<REF(A3,1),A3,DRAWNULL),COLOR009B00,LINETHICK1; Q3:IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1; R4:IF(A4<REF(A4,1),A4,DRAWNULL),COLOR00BB00,LINETHICK1; Q4:IF(A4>REF(A4,1),A4,DRAWNULL),COLOR00007D,LINETHICK1; R5:IF(A5<REF(A5,1),A5,DRAWNULL),COLOR00CC00,LINETHICK1; Q5:IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00009F,LINETHICK1; R6:IF(A6<REF(A6,1),A6,DRAWNULL),COLOR00CC00,LINETHICK1; Q6:IF(A6>REF(A6,1),A6,DRAWNULL),COLOR00009F,LINETHICK1; R7:IF(A7<REF(A7,1),A7,DRAWNULL),COLOR00CC00,LINETHICK1; Q7:IF(A7>REF(A7,1),A7,DRAWNULL),COLOR00009F,LINETHICK1; DRAWTEXT(突破=1,L,'突破'),COLORYELLOW; DRAWTEXT(選票=1,C,'選票'),COLORMAGENTA; DRAWTEXT(選股=1,A8,'選股'),COLORWHITE; DRAWICON(XJ金叉=1,L-0.02,1); 源碼有點(diǎn)大 但好用 喜歡就拿去吧,用法等編好后,看看人氣好的話再發(fā)上來。 |
|