"看到國外的操作方法改良後效果還不錯"
OPPS操作法和TD操作法
OOPS操作法原適用於大阪日經225指數;由Larry Williams研發出來的交易策略
TD操作法則和OOPS操作法類似
策略如下
OPPS操作:
1. 操作前提為跳空開盤,無跳空開高或跳空開低之分
2. 今開盤價低於前低,則突破前日低點則買進
3. 今開盤價高於前高,則跌破前日高點則賣出
4. 停損40日圓,沒有停利
5. 收盤前10分鐘市價出場
TD操作:
1. 今開盤價於前日K棒高低點之內
2. 突破前日高點則買進
3. 跌破前日低點則賣出
4. 停損40日圓,沒有停利
5. 收盤前10分鐘市價出場
TS原始碼如下:
用在臺指10分K 一天進場一次 停損200點
input:stoploss(200);
vars:count(0);
if date[0] <> date[1] then begin
count = 0;
end;
{*****OPPS*****}
if time < 1335.00 and count=0 then begin
if opend(0) > highd(1) and c < highd(1) then being
sell("S1") next bar at market;
count=count+1;
end;
if opend(0) < lowd(1) and c > lowd(1) then begin
buy("B1") next bar at market;
count=count+1;
end;
end;
{*****TD*****}
if time < 1335.00 and count=0 then begin
if opend(0) > lowd(1) and opend(0) < highd(1) then begin
if c > highd(1) then begin
buy("B2") next bar at market;
count=count+1;
end;
if c < lowd(1) then begin
sell("S2") next bar at market;
count=count+1;
end;
end;
end;
{*****StopLoss*****}
if count<>0 and time < 1340.00 then begin
if c < entryprice(0)+stoploss then begin
exitlong("StopB") next bar at market;
end;
if c > entryprice(0)+stoploss then begin
exitshort("StopS") next bar at market;
end;
end;
if marketposition > 0 and time = 1335.00 then begin
exitlong("ExitB") next bar at market;
end;
if marketposition < 0 and time = 1335.00 then begin
exitshort("ExitS") next bar at market;
end;
績效圖??免了...
上面這樣是賠錢的
有興趣的自己改...