m:=NUMTOSTR(50,0)
ema10:STKINDI('','EXPMA.M2',0,4,0);
ema50:STKINDI('','EXPMA.M3('&m&')',0,4,0);//expma默认的不包括50周期,需要自行传入参数
kdcond:cross(ema10,ema50);
kkcond:cross(ema50,ema10);
pdcond:c<ema10;
pkcond:c>ema10;
sellshort(holding<0 and pkcond,holding,market);//平空
buy(holding=0 and kdcond,1,market);//开多
sell(holding>0,pdcond,market);//平多
buyshort(holding=0 and kkcond,1,market);//开空