求助:我想要 1. 趴數停損或是 2.特定時間出場,或是3.漲停的話隔天直接出場
{目前寫法,3.有問題,漲停的話會在當天13:29出場}
if Filled > 0 and position > 0 and close <> GetField("漲停價", "D")
then begin
if SL>0 AND Close <= FilledAvgPrice*(1-(0.01*SL)) then
SetPosition(0); //價格停損
if CurrentTime >= 130300 then
SetPosition(0); //時間出場
end ;
if Filled > 0 and position > 0 and close = GetField("漲停價", "D")
then begin
if FilledRecordDate(FilledRecordCount) <> Date then setposition(0);//價格漲停就換日出場
end;
3 評論