欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。
r1:=stkindi('','macd.macd1',0,3);
r2:=stkindi('','macd.macd1',0,5);
if r1>0 then buy(holding=0,1,thisclose);
if r1<0 then buyshort(holding=0,1,thisclose);
if holding>0 and ((r1<0 and c<enterprice) or r2<0) then sell(1,1,thisclose);
if holding<0 and ((r1>0 and c>enterprice) or r2>0) then sellshort(1,1,thisclose);