if islastbar and dynainfo(207)<92500 then begin
extgbdataset('AAC1_hold',0);
end
这个是时间段初始化~
有无办法在我运行这个程序的时候无论什么时间段都可以初始化那个变量为0呢?
就是我运行这个程序的2秒内自动帮我赋值为0~之后就不用管了...由其他语句赋值~
仅仅在我运行这个程序的第一秒...
if islastbar and 本程序运行时间<2秒 then begin
extgbdataset('AAC1_hold',0);
end
globalvariable:aa=0;
……
if not(islastbar) then exit;
aa:=aa+1;
if aa<3 then extgbdataset('AAC1_hold',0);
globalvariable:aa=0;
if not(islastbar) then exit;
aa:=aa+1;
if aa<3 then extgbdataset('t',0);
if ((CROSS(CBLP,C) AND CBLC>C) OR (CBLP>C AND CROSS(CBLC,C))) AND DD1 and islastbar and barpos>extgbdata('t') then begin//condition改為相應的條件
playsound(1,'C:\Weisoft Stock\BW-DOWN.wav');
extgbdataset('t',barpos);
end
是否这樣更改,对不对呀!
globalvariable:aa=0;
if not(islastbar) then exit;
aa:=aa+1;
if aa<3 then extgbdataset('t',0);
if ((CROSS(CBLP,C) AND CBLC>C) OR (CBLP>C AND CROSS(CBLC,C))) AND DD1 and islastbar and barpos>extgbdata('t') then begin//condition改為相應的條件
playsound(1,'C:\Weisoft Stock\BW-DOWN.wav');
extgbdataset('t',barpos);
end
是否这樣更改,对不对呀!
再問多一些,若有两個变量是否这樣写???
globalvariable:aa=0;
if not(islastbar) then exit;
aa:=aa+1;
if aa<3 then extgbdataset('t',0);
if aa<3 then extgbdataset('tt',0);
是,三个的话依次类推.