ma5:ma(c,5);
ma10:ma(c,10);
kd:cross(ma5,ma10);
ss:=1000;
可用持仓:holding-dayholding;
//最新价小于加仓的价格 直接全平,注意这里是按照可用持仓判断的、
if c<enterprice and 可用持仓>ss then sell(1,holding,market);
if c/avgenterprice>=1.05 and holding=ss then 加仓:buy(1,0.1*ss,market);
初始开多:buy(kd and holding=0,ss,market);