請問日內交易,虧損達到1萬就止損不再交易怎么寫? [金字塔]
- 咨詢內容:
請問日內交易,虧損達到1萬就止損不再交易怎么寫?謝謝
- 金字塔客服:
//多頭為例
VARIABLE:a=0,n=0;
if date<>ref(date,1) then BEGIN
a:=asset;
n:=0;
end
if 開倉條件 and n=0 then buy(holding=0,1,market);if a-asset>=10000 then begin
[此貼子已經被作者于2014/11/24 16:14:09編輯過]
sell(holding>0,holding,market);
n:=1;
end - 用戶回復:
r1:=barslast(date<>ref(date,1));if r1=0 then n1:=1;
if ref(asset,r1+1)-asset>10000 thenbeginsell(1,0,limitr,c);sellshort(1,0,limitr,c);n1:=-1;end//在開倉條件中加n1>0
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容