?
?
?來源:程序化久久網(wǎng)( www.kzuj.com.cn )
if high>=N and vol<ref(vol,1)? then //高點
begin
sell(holding>0,holding,MARKET);
buyshort(holding=0,1,MARKET);
end
if low<M and vol<ref(vol,1) then //低點
begin
sellshort(holding<0,holding,MARKET);//不知道你別的地方可有平倉語句,你視情況選擇保留這里的平倉與否,下面的類似。圖表下是不能鎖倉的。
buy(holding=0,1,MARKET);
end