選股公式: 周期:=10; 均線:=5; 角度:=20; P:=周期; H1:=IF(H=HHV(H,P),H,DRAWNULL); H2:=CONST(BARSLAST(H1!=DRAWNULL)); H3:=CONST(IF(H2=0,L,REF(L,H2))); H4:=CONST(REF(BARSLAST(L<H3),H2+1)+H2+1); H5:=CONST(IF(H4=0,L,REF(L,H4))); H6:=CONST(REF(BARSLAST(L<H5),H4+1)+H4+1); 止損:=IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,REF(L,H6))), DRAWNULL),COLORYELLOW; {顧比倒數(shù)止損位。} AA:=C>止損; {收盤(pán)價(jià)在止損位之上,即回踩不破止損位。} MA5:=MA(C,5); MA10:=MA(C,10); MA20:=MA(C,20); MA30:=MA(C,30); MA60:=MA(C,60); MA120:=MA(C,120); MA200:=MA(C,200); MA20JD:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416; MA30JD:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416; MA60JD:=ATAN((MA60/REF(MA60,1)-1)*100)*180/3.1416; MA120JD:=ATAN((MA120/REF(MA120,1)-1)*100)*180/3.1416; MA200JD:=ATAN((MA200/REF(MA200,1)-1)*100)*180/3.1416; MAN:=MA(C,均線); BB:=MA20>MA30 AND MA30>MA60 AND MA60>MA120 AND MA120>MA200; {大五線多頭排列。} CC:=CROSS(MAN,L) AND C>MAN; {回踩均線:N日均線穿過(guò)當(dāng)日K線且當(dāng)日收盤(pán)價(jià)在N日均線之上,即回踩而不破位。} DD:=(MIN(OPEN,CLOSE)-LOW)/(HIGH-LOW)>(1/3); {篩選條件:K線下引線必須占K線振幅的1/3以上,盡可能篩選出股價(jià)回踩止跌的股票。} EE:=MA20JD>角度 AND MA120JD>0 AND MA200JD>0; {通過(guò)調(diào)節(jié)均線角度,控制支撐力度。} DIF:=EMA(CLOSE,12)-EMA(CLOSE,26); {要求:MACD位于0軸上方,行情處于多頭市場(chǎng)。} DEA:=EMA(DIF,9); FF:=BARSLASTCOUNT(DIF>0 AND DEA>0); XG:AA AND BB AND CC AND DD AND EE AND FF;
|