|
你原來方式 K1 = 1 以後 , 要使用
if Close < Average(Close N) then begin
sellshort next bar at market ;
K1 = 0 ;
end ;
如此回到均線上才會作多
----------------------------------------------------
使用Cross 的方式 , 就可避免
if marketposition <> 1 and Close cross over Average(Close, N) then buy next bar at Market ;
if marketposition <> -1 and Close cross under Average(Close,N) then Sellshort next bar at Market ;
|
評分
-
查看全部評分
|