請(qǐng)問(wèn)日內(nèi)交易,虧損達(dá)到1萬(wàn)就止損不再交易怎么寫? [金字塔]
- 咨詢內(nèi)容:
請(qǐng)問(wèn)日內(nèi)交易,虧損達(dá)到1萬(wàn)就止損不再交易怎么寫?謝謝
- 金字塔客服:
//多頭為例
VARIABLE:a=0,n=0;
if date<>ref(date,1) then BEGIN
a:=asset;
n:=0;
end
if 開倉(cāng)條件 and n=0 then buy(holding=0,1,market);if a-asset>=10000 then begin
[此貼子已經(jīng)被作者于2014/11/24 16:14:09編輯過(guò)]
sell(holding>0,holding,market);
n:=1;
end - 用戶回復(fù):
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//在開倉(cāng)條件中加n1>0
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容