阅读版:
以下内容为程序代码:
1 myaccount:='666666';
2 sleeptime:=1000*3;
3
4 if tbuyholdingex(myaccount,stklabel,0)=0 then begin
5 if true then begin
6 tbuy(1,1,lmt,close,0,myaccount,stklabel),allowrepeat;
7 sleep(sleeptime);
8 if tisremainex(1,myaccount,stklabel) then begin
9 tcancelex(1,1,myaccount,stklabel);
10 exit;
11 end
12 end
13 end
14
15 if tsellholdingex(myaccount,stklabel,0)=0 then begin
16 if true then begin
17 tbuyshort(1,1,lmt,close,0,myaccount,stklabel),allowrepeat;
18 sleep(sleeptime);
19 if tisremainex(3,myaccount,stklabel) then begin
20 tcancelex(1,3,myaccount,stklabel);
21 exit;
22 end
23 end
24 end
25
26 if tbuyholdingex(myaccount,stklabel,0)>0 then begin
27 if true then begin
28 tsell(1,tbuyholdingex(myaccount,stklabel,0),close,0,myaccount,stklabel),allowrepeat;
29 sleep(sleeptime);
30 if tisremainex(2,myaccount,stklabel) then begin
31 tcancelex(1,2,myaccount,stklabel);
32 exit;
33 end
34 end
35 end
36
37 if tsellholdingex(myaccount,stklabel,0)>0 then begin
38 if true then begin
39 tsellshort(1,tsellholdingex(myaccount,stklabel,0),close,0,myaccount,stklabel),allowrepeat;
40 sleep(sleeptime);
41 if tisremainex(4,myaccount,stklabel) then begin
42 tcancelex(1,4,myaccount,stklabel);
43 exit;
44 end
45 end
46 end
47
拷贝版:
myaccount:='666666';
sleeptime:=1000*3;
if tbuyholdingex(myaccount,stklabel,0)=0 then begin
if true then begin
tbuy(1,1,lmt,close,0,myaccount,stklabel),allowrepeat;
sleep(sleeptime);
if tisremainex(1,myaccount,stklabel) then begin
tcancelex(1,1,myaccount,stklabel);
exit;
end
end
end
if tsellholdingex(myaccount,stklabel,0)=0 then begin
if true then begin
tbuyshort(1,1,lmt,close,0,myaccount,stklabel),allowrepeat;
sleep(sleeptime);
if tisremainex(3,myaccount,stklabel) then begin
tcancelex(1,3,myaccount,stklabel);
exit;
end
end
end
if tbuyholdingex(myaccount,stklabel,0)>0 then begin
if true then begin
tsell(1,tbuyholdingex(myaccount,stklabel,0),close,0,myaccount,stklabel),allowrepeat;
sleep(sleeptime);
if tisremainex(2,myaccount,stklabel) then begin
tcancelex(1,2,myaccount,stklabel);
exit;
end
end
end
if tsellholdingex(myaccount,stklabel,0)>0 then begin
if true then begin
tsellshort(1,tsellholdingex(myaccount,stklabel,0),close,0,myaccount,stklabel),allowrepeat;
sleep(sleeptime);
if tisremainex(4,myaccount,stklabel) then begin
tcancelex(1,4,myaccount,stklabel);
exit;
end
end
end
[此贴子已经被作者于2011-1-9 12:00:55编辑过]