请教老师;图表程序化模型如下编写是否正确?
if aaa and bbb then begin
if aaa and ccc then begin
开空A: buyshort(holding=0,jisl,market);
end
end
if ccc and 111 then begin
if ccc and 222 then begin
if ccc and 333 then begin
if ccc and 444 then begin
平空A:sellshort(holding<0,holding,market);
end
end
end
end
(aaa,bbb,ccc等是交易条件)
我这样编写后检测能通过,却不出现信号。请老师看看是什么问题?谢谢
明白了,谢谢老师。把每个条件都分开写,这样写对吗?
if aaa and bbb then begin
开空A: buyshort(holding=0,jisl,market);
end
if aaa and ccc then begin
开空A: buyshort(holding=0,jisl,market);
end
if ccc and 111 then begin
平空A:sellshort(holding<0,holding,market);
end
if ccc and 222 then begin
平空A:sellshort(holding<0,holding,market);
end
if ccc and 333 then begin
平空A:sellshort(holding<0,holding,market);
end
if ccc and 444 then begin
平空A:sellshort(holding<0,holding,market);
end
谢谢
不是我要不要分开写,而是问你,你分开写和一起写的意思不一样。一起写是全部条件都成立才出信号,分开写就是分开的条件
明白了,谢谢老师