欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。
这样写就对了,这是交易逻辑处理的问题
input:man(26,2,200);
ma1:=ma(close,man);ccm:=cross(close,ma1);cmc:=cross(ma1,close);
资产:ASSET,LINETHICK0;可用现金:CASH(0),LINETHICK0;持仓:HOLDING,LINETHICK0;
if ccm thenbegin//平空开多sellshort(holding<0 and ccm,0);buy(holding<=0,1);end
if cmc thenbegin//平多开空sell(holding>0 and cmc,0);buyshort(holding>=0,1);end