input:A(1,1,100,1);
input:B(1,1,100,1);
input:CC(1,1,100,1);
input:E(1,1,100,1);
input:F(1,1,100,1);
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
cond1:close>ma(close,480);
cond2:ref((high-close)<=0.3*(close-open),hhvbars(close,A));
cond22:ref(vol>CC*ma(vol,B),hhvbars(close,A));
cond3:cross(MACD,0);
cond4:close-low+E<F;
if cond1 and cond2 and cond22 and cond3 and cond4 and holding<=0 then buy(1,1,marketr);
//止损
if close<ref(low,hhvbars(close,A))-E and ma(close,120)>enterprice and holding>0 then sell(1,holding,marketr);
以多头为例,cond1到4分别对应你上面四个条件,建议用户自己学习下代码看看逻辑