Hi 小幫手
以下假設都有勾選網路斷線繼續執行
1. 若以下程式碼
if position = 0 and filled = 0 and _LongCondition and currentTime = 133000 then
begin
setposition(2, MARKET, label:="多單進場");
_LongCondition = false;
_EntryDay = 1;
end;
在133000訊號觸發當下,網路剛好瞬間斷線,送單跟成交的狀況會是如何?
2. 若以下程式碼
if position = 0 and filled = 0 and _LongCondition and currentTime >= 133000 and currentTime <= 133030 then
begin
setposition(2, MARKET, label:="多單進場");
_LongCondition = false;
_EntryDay = 1;
end;
a. 在133000,網路剛好瞬間斷線,133001網路連線,送單跟成交的狀況會是如何?
b. 在133000 ~133030,網路都是正常的,送單跟成交的狀況會是如何?
我的主要目的是避免出訊號的當下,網路剛好瞬間斷線,導致程式沒將單子送出,造成虧損。
3 評論