通達(dá)信幾個(gè)選股公式(2010-12-06 21:31:22) 分類:選股指標(biāo) macd頂?shù)妆畴x公式,要此公式監(jiān)測到 4月16日大盤頂部背離 準(zhǔn)確率很高 DIFF:EMA(CLOSE,6)-EMA(CLOSE,30); DEA:EMA(DIFF,6); MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背離:REF(L,A1+1)>L AND(L, DIFF)>REF((L,DIFF),A1+1) AND CROSS(DIFF,DEA); STICKLINE(底背離,0,0.03,6,0),COLOR00FF00; DRAWLINE(A1=0,(DIFF),底背離,(DIFF),0),COLORRED,LINETHICK2; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 頂背離:REF(H,A2+1)<H AND REF((H,DIFF),A2+1)>(H,DIFF) AND CROSS(DEA,DIFF); DRAWLINE(A2=0,DIFF,頂背離,DIFF,0),COLORGREEN,LINETHICK2;
底部放量
LOWV:=LLV(LOW,15); {15天內(nèi)的最低價(jià)} HIGHV:=HHV(HIGH,15); {15天內(nèi)的最高價(jià)} HIGHVV:=HHV(HIGH,40); {40天內(nèi)的最高價(jià)} V0:=V; {當(dāng)天的成交量} V11:=REF(V,1); {一天前的成交量} V22:=REF(V,2); {兩天前的成交量} V3:=REF(V,3); {三天前的成交量} HV22:=HHV(V,35); {35天內(nèi)的最大成交量} D0U:=C>O; {今天是陽線} D1U:=REF(C,1)>=REF(C,2); {昨天是陽線} 橫盤:=((HIGHV-LOWV)/HIGHV)<0.15; {半個(gè)月內(nèi)價(jià)格波動小于15%} 放量1:=V0>=(1.8*((V11+V22+V3)/3)); {今天量是前三天均量的1.8倍} 放量2:=V0<=(3.8*V11); { 今天的量在昨天量的四倍范圍內(nèi)} 今天陽線:=D0U; {今天是陽線} 昨天陽線:=D1U; {昨天是陽線} 今天中陽:=(C-REF(C,1))/REF(C,1)>=0.018; {今天漲幅大于1.8%} 開盤非最高價(jià):=C<=HIGHVV; {收盤非40天內(nèi)最高價(jià)} 收盤非最高價(jià):=O<=HIGHVV; {開盤非40天內(nèi)最高價(jià)} 非最大成交量:=V0<HV22; {非一個(gè)月內(nèi)最高成交量} 放量啟動B:= 橫盤 AND 放量1 AND 放量2 AND 今天陽線 AND 昨天陽線 AND 今天中陽 AND 開盤非最高價(jià) AND 收盤非最高價(jià) AND 非最大成交量,LINETHICK2 ;
X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01; X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01; X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01; 買入:MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3 AND 放量啟動B,LINETHICK2;
A1:=MA(C,5); A2:=MA(C,10); A3:=MA(C,55); A4:=MA(C,120); 條件:=COUNT(A1>A2 AND A2>A3 AND A3>A4,4)=3 AND C>A1;{均線多頭排列} 條件1:=(C-REF(C,1))/REF(C,1)*100;{漲跌幅} 選股:條件 AND 條件1>N;{N:-10,10,缺省自己設(shè)置}
頂部預(yù)警公式:周K線到達(dá)頂層區(qū)域時(shí)的預(yù)警公式。
TS:=350;N:=95; DA1:=IF(TS>TOTALBARSCOUNT,TOTALBARSCOUNT,TS); DA:=IF(CURRBARSCOUNT>DA1,0,DA1); HI:=REFDATE(HHV(H,DA),DATE);{最高價(jià)} LO:=REFDATE(LLV(L,DA),DATE); C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL); GZ:=EXP(LN(HI/LO)/15); {對數(shù)格值} LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA); LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA); LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA); LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA); LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA); LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA); LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA); LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA); LH9:=SUM(IF(C1>=(HI/POW(GZ,9)) AND C1<LO*POW(GZ,7),V,0),DA); LH10:=SUM(IF(C1>=(LO*POW(GZ,5)) AND C1<LO*POW(GZ,6),V,0),DA); LH11:=SUM(IF(C1>=(LO*POW(GZ,4)) AND C1<LO*POW(GZ,5),V,0),DA); LH12:=SUM(IF(C1>=(LO*POW(GZ,3)) AND C1<LO*POW(GZ,4),V,0),DA); LH13:=SUM(IF(C1>=(LO*POW(GZ,2)) AND C1<LO*POW(GZ,3),V,0),DA); LH14:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA); LH15:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA); L1:=REFDATE(HHV(LH1,DA),DATE); L2:=REFDATE(HHV(LH2,DA),DATE); L3:=REFDATE(HHV(LH3,DA),DATE); L4:=REFDATE(HHV(LH4,DA),DATE); L5:=REFDATE(HHV(LH5,DA),DATE); L6:=REFDATE(HHV(LH6,DA),DATE); L7:=REFDATE(HHV(LH7,DA),DATE); L8:=REFDATE(HHV(LH8,DA),DATE); L9:=REFDATE(HHV(LH9,DA),DATE); L10:=REFDATE(HHV(LH10,DA),DATE); L11:=REFDATE(HHV(LH11,DA),DATE); L12:=REFDATE(HHV(LH12,DA),DATE); L13:=REFDATE(HHV(LH13,DA),DATE); L14:=REFDATE(HHV(LH14,DA),DATE); L15:=REFDATE(HHV(LH15,DA),DATE); SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10+L11+L12+L13+L14+L15); XG:=CEILING(DA*L1/SS)*3>=CURRBARSCOUNT, HI*N/100; 預(yù)警:C>XG;