請教大神
inputs: RSI_Length(14);variables: var_RSI(0);
var_RSI = RSI( close, RSI_Length ) ;
if var_RSI > 70 then SellShort next bar at market;
if var_RSI<25then buy next bar at market;
//exit
Inputs: Maxloss(60),profit(30);
if marketposition = 1 then begin
sell all shares next bar at entryprice - Maxloss stop;
sell all shares next bar at entryprice + profit limit;
end;
if marketposition = -1 then begin
buytocover all shares next bar at entryprice + Maxloss stop;
buytocover all shares next bar at entryprice - profit limit;
end;
請問高手為啥我這樣RSI有訊號時 入了一口 但是當他又有訊號 又重複入一口 設定那邊 也改了 只能下一口 請問有辦法改善嗎?
進場 你沒做限制呀
加一個marketposition = 0
當沒有部位時才進場
if marketposition = 0 and var_RSI > 70 then SellShort next bar at market;
if marketposition = 0 and var_RSI<25then buy next bar at market;
頁:
[1]