本帖最後由 trading144 於 10-11-12 10:26 PM 編輯
Inputs: Auto(0);
Vars:nowposition;
[IntrabarOrderGeneration = true];
DefineDLLFunc: "C:\Program Files\OrderMaster\myMCtool.dll",bool,"MC4WriteFile",LPSTR,LPSTR;
if Auto=1 then begin
DefineDLLFunc: "C:\Program Files\OrderMaster\OMSignAPI.dll",bool,"IniDllAndPosition",LPSTR,int;
DefineDLLFunc: "C:\Program Files\OrderMaster\OMSignAPI.dll",bool,"GoOrder",LPSTR,LPSTR,LPSTR,int,double;
nowposition=marketposition*currentcontracts;
if date<>date[1] then IniDllAndPosition("MXF", nowposition); //MXF 自訂名稱作為 識別碼
end;
nowposition=marketposition*currentcontracts;
if Auto=1 then begin
if nowposition = 0 then begin
signDTStr = numtostr(year(date)+1900,0) +"/" + numtostr(month(date),0)
+ "/" + numtostr(dayofmonth(date),0) + " " + numtostr(time_s,0);
GoOrder("MXF", "", signDTStr , nowposition, ExitPrice(0));
end
else begin
signDTStr = numtostr(year(date)+1900,0) +"/" + numtostr(month(date),0)
+ "/" + numtostr(dayofmonth(date),0) + " " + numtostr(time_s,0);
GoOrder("MXF", "", signDTStr , nowposition, EntryPrice(0));
end;
end;
下單大師,萬用API 設定 識別碼也要打上 MXF(這是 看你程式自訂的名稱) |