|
我自己亂想的 ,你試試 ....
if condition1 and DT = 0 then begin
DT = 1;
buy("buy") next bar at market;
end
else if condition2 and DT = 0 then begin
DT=2;
sellshort("sell") next bar at market;
end;
else
if marketposition = 0 and DT = 1 and condition3 then begin
buy next bar at market;
DT=3;
end;
if marketposition = 0 and DT = 2 and condition4 then begin
sellshort next bar at market;
DT=4;
end;
end; |
|