p1:MA(CLOSE,5);
p2:MA(CLOSE,10);
kd:=CROSS(p1,p2);
kk:=CROSS(p2,p1);
d1:=p2>ref(p2,1);
k1:=ref(p2,1)>p2;
if kd then begin
if d1 then
buy (holding=0, 1 ,THISCLOSE);
end
if pd then begin
sell(holding>0, 1 ,THISCLOSE) ;
end
else
if kk then begin
if k1 then
BUYSHORT(HOLDING=0, 1 ,thisclose);
end
if pk then begin
sellshort(holding<0,1 ,THISCLOSE);
end
这样写的语法 , 有什么错误 ?信号不能显示在要开的位置 ,如图

问题出在哪/?
代码提供的条件不完整,没法调试,你说的那个位置没有信号,应该是holding不等于零,或者持有另一个方向的仓位。
你自己输出holding,在这个位置看下具体值,其他提条件也可以输出,如:条件1:d1;
基本的输出调试有助于理解代码执行逻辑和实际需求直接的差异。并进行更正