想請教
當我使用 close_D = GetSymbolField("Future*1", "收盤價", "D");這個函式
condition16 = sma_20_D > sma_20_D[1] and sma_20_D[1] > sma_20_D[2] and sma_20_D[2] > sma_20_D[3];
設定好日線條件後,來到策略下單的地方
{進場條件1}
if condition16 then begin
if Position= 0 and condition1 and condition2 and condition4 and condition5 and condition7 and condition8 and condition9 and condition13 then begin
SetPosition(2,market);
end;
end else if Position= 0 and condition1 and condition2 and condition3 and condition4 and condition5 and condition7 and condition8 and condition9 then begin
SetPosition(1,market);
end;
{進場條件2}
if condition15 then begin
if Position= 0 and condition1 and condition4 and condition9 and condition12 and condition13 then begin
SetPosition(2,market);
end;
end;
有以下兩個問題:
1.像最近 很明顯的小台日20MA 應該都是上斜的,不過判斷式卻還是會下到一口單的地方。
想請教是哪裡語法有誤嗎?
2.另外還有 明明權益數是夠下兩口單綽綽有餘的,但有時候卻只會成交一口,另一口顯示資金不足,是因為什麼呢?
3 評論