大家好 目前遇到卡住的問題如下:
我執行交易程式五分k回測時 發現我目前寫法 沒辦法觸發第二次進場 (舉例: 假設某支股票 09050910五分k第一次符合條件high-close=0.5進場 但09100915第二次符合條件卻沒辦法進場
想請問我要怎麼寫才能讓程式能夠觸發第二次 或第N次條件進場
感謝
if position=0 and Time>=090500
and GetSymbolInfo("買賣現沖")
and high-close>=0.5
and close<100
and close>=50
and time<100000 then begin
SetPosition(-1, MARKET);
end;
if position=-1 and (time=120000) then SetPosition(0, MARKET);
2 評論