MACD首次出紅柱的選股公式

2022-01-21 22:15:11 字數 573 閱讀 5352

編寫要求:

條件:1.macd首次出紅柱;2.股價上穿30日**;3.30日**向上執行;4.skd的k小於50;5.今日的成交量是昨日的1.5倍;6.30天裡上下振幅不超20%。

股旁網解答:

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;