小弟想要計算兩筆TICK的成交價差異,在相差大於3個TICK時發出警告
使用了READTICKS函數,但發現好像會漏抓
像是佳龍在8/7 09:53時分時明細上兩筆TICK差已經符合策略但卻沒顯示
var: OneTick(0); IF C<10 then OneTick=0.01; IF C>=10 and C<50 then OneTick=0.05; IF C>=50 and C<100 then OneTick=0.1; IF C>=100 and C<500 then OneTick=0.5; IF C>=500 and C<1000 then OneTick=1; IF C>=1000 then OneTick=5; var: intrabarpersist readtick_cookie(0); array: tick_array[500, 11](0); var: idx(0); value50 = ReadTicks(tick_array, readtick_cookie); for idx = 1 to value50 begin IF tick_array[1, 2] >= 090100 and (tick_array[2, 3] - tick_array[1, 3]) >= 3*OneTick THEN BEGIN RET=1; END; end;
附上警示圖片、明細、原始碼,還請解惑,謝謝!!!
3 評論