|
jackthetan 發表於 15-6-17 09:38
這是幫朋友問的, 背離我也是有想寫,
但是還沒時間測試.
var:len(10),level(0),temp_price(0);
if marketposition=0 and level=0 and RSI(close,len)<20 then begin;
level=1;
temp_price=close;
end;
if marketposition=0 and level=1 and RSI(close,len)>20 then begin;
level=2;
end;
if marketposition=0 and level=2 and RSI(close,len)<20 then begin;
if close<temp_price then begin;
sell short next bar at market;
level=0;
end;
end;
沒實際run過,不知道這樣對不對..................
|
|