这个策略按20日线上操作,因为20日均线是防狼术,红线上穿买蓝线反之的指标做的,评估下来经常比系统自带的收益高,但也要看股性的,还有历史不代表未来
像段时间弱势震荡行情,信号比较多,也就是操作复杂度也高些
VAR1:=LLV(LOW,6);{cow/bear+m20}
VAR2:=HHV(HIGH,6);
COW:=EMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5);
BEAR:=EMA(0.667*REF(COW,1)+0.333*COW,2);
KK:=IF(COW>BEAR,1,1.025);
KEY:=CLOSE*BEAR/COW*KK;
M20:=IF((CLOSE>MA(CLOSE,20)),1,0);
BUYIN:TRADETO(0,KEY*M20);
SELLOUT:TRADETO(1,KEY);
|