60分鐘的第二根K棒開於第一根之內
則突破第一根K棒高點則買進
則跌破第一根K棒低點則賣出
一篇滿久的文章,2007年的問題
這是個很簡單的交易策略,雖然板上已經有寫出答案,但是這
個答案似乎跟上面想法有點出入,因此在這裡將上面的想法利
用TS回測,並將想法修正成5K線:
開盤60分鐘後,9:45時開於前60分鐘高低點內
則突破高點則買進
則跌破低點則賣出
vars: HL(0), LL(0), flag(0);
if date[1] <> date[0] then
flag = 0;
if time = 0945 then begin
HL = highest(high, 12);
LL = lowest(low, 12);
end;
if time = 0945 and close < HL and close > LL then
flag = 1;
If time >= 0945 and time < 1330 and flag = 1 then begin
buy("B") 1 contract HL stop;
sell("S") 1 contract LL stop;
end;
If time=1335 and CurrentContracts <> 0 then begin
exitlong("EL") this bar on close;
exitshort("ES") this bar on close;
end;
全站熱搜