進場邏輯:
當日1分K高點小於前十日最低點進空單
為何2022/07/13 旺宏(2337)會進場呢?
input:period(10,"計算天數");
Value1 = lowest(Getfield("LOW","D")[1],period);
condition1 = high cross below value1;
input:amplitude(5.0,"當日跌幅");
condition3 = 100 * (closeD(1)-lowD(0))/closeD(1) <= amplitude;
input: amount(200000, "交易金額");
entry_position = floor(amount / (close*1000)); //計算總共可以買幾張
if currentTime<132000 and Position = 0 and Filled = 0 and condition1 and condition3 then begin
SetPosition(-entry_position);
end;
3 評論