请老师帮忙编写一下:
ma(c,5)金叉ma(C,60),建立2N手数多头仓位;当C跌破ma(C,60)时,平多仓N手;
当ma(c,5)死叉ma(C,60),建立2N手数空头仓位;当C上穿ma(C,60)时,平空仓N手;
谢谢老师了!~
ma5:=ma(c,5);
ma60:=ma(c,60);
if cross(ma5,ma60) then buy(holding=0,2*n,market);
if holding>0 and cross(ma60,c) then sell(1,n,market);
if cross(ma60,ma5) then buyshort(holding=0,2*n,market);
if holding<0 and cross(c,ma60) then sellshort(1,n,market);