这段代码存成图表交易系统,技术员试试看,为什么消息框乱弹提示?
BUYSHORT(barpos=datacount-20,3,marketr);
sellshort(barpos=datacount-7,0,marketr);
hii:=if(islastbar,tholding2,0),linethick0;
hllj1:holding>0 and hii[datacount]<0,linethick0;
hllj2:holding<0 and hii[datacount]>0,linethick0;
hllj3:holding>0 and holding>hii[datacount] ,linethick0;
hllj4:holding<0 and holding
skjia:=DYNAINFO( 28);
skjia:=skjia[datacount];
sdjia:=DYNAINFO( 34);
sdjia:=sdjia[datacount];
kdjia:=enterprice;
kdjia:=kdjia[datacount];
kkjia:=enterprice;
kkjia:=kkjia[datacount];
if not(islastbar) then goto fangshou;
if hllj1[datacount]=1 then
begin
MSGOUT(1,'平空,价格:'&numtostr(skjia,2));
end;
if hllj2[datacount]=1 then
begin
MSGOUT(1,'平多,价格:'&numtostr(sdjia,2));
end;
if hllj3[datacount]=1 then
begin
MSGOUT(1,'开多,价格:'&numtostr(kdjia,2));
end;
if hllj4[datacount]=1 then
begin
MSGOUT(1,'开空,价格:'&numtostr(kkjia,2));
end;
fangshou@;
skjia:=skjia[datacount];
你这个数组用的最后一根k的数据了,就时弹框里第三条说明
请版主回答问题的时候先用问题涉及的代码实际测试一下,到底自己搞清楚问题没有
你可能都没看懂代码,而是轻率的作答
[此贴子已经被作者于2015/11/5 12:26:56编辑过]
在逐K线模式不要用skjia[datacount]; 这样的未来数据引用方式
啥也别说了,复制代码到金字塔里试试就知道问题了,不要轻率的回答一个老塔民的问题
[此贴子已经被作者于2015/11/5 12:29:11编辑过]
这个提示框里也和您解释原因了阿
此主题相关图片如下:_2v30(q5ulpwuc98xd9p__m.jpg
