編寫要求: 條件:
1.MACD首次出紅柱;
2.股價上穿30日均線;
3.30日均線向上運行;
4.SKD的K小于50;
5.今日的成交量是昨日的1.5倍;
6.30天里上下振幅不超20%。
股旁網(wǎng)解答: DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
Ma30:=ma(c,30);
N:=9;
M:=3;
LOWV:=LLV(LOW,N);
HIGHV:=HHV(HIGH,N);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M);
K:=EMA(RSV,M);
D:=MA(K,M);
Ref(MACD,1)<0 and MACD>0
And cross(c,ma30)
And ma30>ref(ma30,1)
And K<50
and Vol>=1.5*ref(vol,1)
and Hhv(c,30)/llv(c,30)<=1.2;
|