MA5=MA(C,5)
if c>ma5 and TBUYHOLDING(1)=0 then buy(1,30%,market),pertrader;
if c-enterprice>50 then sell(1,0,market);
if enterprice-c>10 then sell(1,0,market);
if c<ma5 and TSELLHOLDING(1)=0 then buyshort(1,30%,market),pertrader;
if enterprice-c>50 then sellshort(1,0,market);
if c-enterprice>10 then sellshort(1,0,market);
这个红色字体的返回值,好像测试了,不灵?
就是想多空可以同时持仓,符合各自的出场条件就平仓,这个表达正确吗,请老师修改一下?