[转载][简单有效]文华赢智测试螺纹指数日线,稳定的资金曲线
源码如下:[code]//期货自动化交易系统
//新浪:http://blog.sina.com.cn/zmfco
//编辑:中美期货8
//测试:文华赢智,针对螺纹钢,日线.
MA1:=EMA(C,5);
MA2:EMA(C,5); //此处可以尝试改为10日均线
MA3:EMA(C,20);
MA4:EMA(C,60); //趋势主导线
//CON1:=IF(MA4>=REF(MA4,1),1,0);
CON1:=MA1>MA4;
N1:=BARSLAST(CROSS(MA2,MA3)); //上一次均线金叉到现在的周期数
N3:=BARSLAST(CON1 AND N1>35 AND C
CON2:=BKPRICE-C>BKPRICE*0.05;
CON1 AND N3>10 AND MA2>MA3,BPK;
CON1 AND MA3>MA2,SP; //多头趋势,做多+平仓,不反手
CON1 AND L
CON1 AND N1>35 AND C
CON1 AND CON2 ,SP; //止损
N2:=BARSLAST(CROSS(MA3,MA2)); //上一次均线死叉到现在的周期数
N4:=BARSLAST(NOT(CON1) AND N2> 35 AND C > MA3); //一次持续2个月的大跌必有一次大的回调,应避免10天
CON3:=C-SKPRICE>SKPRICE*0.05;
NOT(CON1) AND N4>10 AND MA3 > MA2,SPK;
NOT(CON1) AND MA2>MA3,BP; //空头趋势,做空+平仓,不反手
NOT(CON1) AND H>MA4,BP; //避免急剧下跌
NOT(CON1) AND N2>35 AND C > MA3, BP; //持续2月下跌,必定回调,早点空仓
NOT(CON1) AND CON3 ,BP; //止损
AUTOFILTER;
[/code] 绩效如下:
[attach]7212[/attach] [attach]7214[/attach] [attach]7213[/attach] 谢谢楼主分享! {:smile:} {:114:}
页:
[1]