All MicroEvals
以下Multicharts 程式碼在實單能夠執行嗎? [IntrabarOrderGeneration = true] ...
Create MicroEval
Header image for 以下Multicharts 程式碼在實單能夠執行嗎?
[IntrabarOrderGeneration = true] ...

以下Multicharts 程式碼在實單能夠執行嗎? [IntrabarOrderGeneration = true] ...

Prompt

以下Multicharts 程式碼在實單能夠執行嗎? [IntrabarOrderGeneration = true] // 在程式碼首行宣告強制開啟 IOG 模式 vars: Data1_MA120(0), condition1(false); // 僅保留日盤邏輯 (此時只需要單一商品,直接寫 Close 即可) Data1_MA120 = Average(Close, 120); condition1 = Data1_MA120 > Data1_MA120[5] and Close > Data1_MA120; // === 進場邏輯 === // BarStatus(1) = 2 代表「這根 5 分 K 的最後一筆 Tick」。 // 加上這個條件,可以確保進場只在 13:40 收盤那一瞬間觸發,避免 IOG 在 13:35~13:40 盤中提早亂進場。 if BarStatus(1) = 2 and condition1 and time = 1340 and marketposition = 0 then begin Buy("B") next bar at market; end; // === 出場邏輯 === // Time_s 語法會回傳 HHMMSS 的數值。134430 代表 13:44:30。 // IOG 模式下,next bar at market 的意思是「下一個 Tick 以市價送出」。 if marketposition > 0 and Time_s >= 134430 then begin Sell("Exit") next bar at market; end;