移動止盈的問題 [金字塔]
- 咨詢內(nèi)容:
如下移動止盈代碼有沒有問題? 我覺得看上去沒問題,但圖表上就是信號出不來。請幫我看看:
高點(diǎn):=hhv(h,enterbars);低點(diǎn):=llv(l,enterbars);gg:=barslast(高點(diǎn));ii:=barslast(低點(diǎn));DTYDZY:=ref(bias,gg)>50 and (高點(diǎn)-c)/(高點(diǎn)-enterprice)>=34/100;KTYDZY:=ref(bias,ii)<-50 and (c-低點(diǎn))/(enterprice-低點(diǎn))>=34/100;sell(ref(DTYDZY,1) and holding>0,holding,limitr,open-mindiff);sellshort(ref(KTYDZY,1) and holding<0,holding,limitr,open+mindiff); - 金字塔客服:
enterbars+1 試試
- 用戶回復(fù):
另外你沒有buy和buyshort命令就沒有enterbars
- 網(wǎng)友回復(fù):
最后兩行的holding 那里你要寫手?jǐn)?shù)或者百分比啊!
sell(ref(DTYDZY,1) and holding>0,100%,limitr,open-mindiff);sellshort(ref(KTYDZY,1) and holding<0,100%,limitr,open+mindiff); - 網(wǎng)友回復(fù): sellshort(ref(KTYDZY,1) and holding<0,holding,limitr,open+mindiff); holding<0,你能賣出多少手? 第二個(gè)參數(shù)改成holding絕對值或者0試試。 另外開平倉要對應(yīng),語句順序有要求,可以新建一個(gè)公式看看。 [此貼子已經(jīng)被作者于2014/9/14 17:15:09編輯過]
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容