平倉(cāng)反手不在同一K? [金字塔]
-
咨詢內(nèi)容:
if ref((tmpd=1 or (count(bi=-1,2)=1 and aq1>=1)) and (gpd1 or gpd2),1) then begin
? ?sellshort(1,ss,LIMITR,O);
? ?buy(holding=0,ss,LIMITR,O);
end
多止:valuewhen(enterbars=1,llv(fl,2)),NODRAW;
if enterbars>1 and min(o,c)<=多止-2*MINDIFF then sell(1,ss,marketr);
if holding>0 and ((enterbars>1 and pdd=-1) or (enterbars>15 and aspect=1)) then sell(1,ss,marketr);
if ref((tmpk=-1 or (count(bi=1,2)=1 and aq1>=1)) and (gpk1 or gpk2),1) then begin ? ?sell(1,ss,LIMITR,O); ? ?buyshort(holding=0,ss,LIMITR,O); end? 空止:valuewhen(enterbars=1,hhv(fh,2)),NODRAW; if enterbars>1 and max(o,c)>=空止+2*MINDIFF then sellshort(1,ss,marketr); if holding<0 and ((enterbars>1 and pkk=1) or (enterbars>15 and aspect=0)) then sellshort(1,ss,marketr);?
請(qǐng)幫忙看看?
-
金字塔客服:
具體說(shuō)明下你的問(wèn)題
?
?來(lái)源:程序化久久網(wǎng)( www.tumamayizhan.com )
-
用戶回復(fù):
反手的,平與開(kāi)不在同一個(gè)K上
[此貼子已經(jīng)被作者于2017/5/16 17:01:44編輯過(guò)]?
-
網(wǎng)友回復(fù):
平倉(cāng)在前一K線,開(kāi)倉(cāng)在次K上 。上面語(yǔ)言哪里出問(wèn)題?
?
- 網(wǎng)友回復(fù): if ref((tmpd=1 or (count(bi=-1,2)=1 and aq1>=1)) and (gpd1 or gpd2),1) then begin ? ?sellshort(1,ss,LIMITR,O); ? ?buy(holding=0,ss,LIMITR,O); end 平倉(cāng)反手在圖表中,是同時(shí)進(jìn)行的,也就是說(shuō)在執(zhí)行sellshort和buy是使用的同一個(gè)holding的狀態(tài)值,所以在平倉(cāng)后就會(huì)造成buy(holding=0,...)條件不滿足,。也就是你看到的現(xiàn)象 你可以改成 ?sellshort(1,holding,LIMITR,O); ? ?buy(1,ss,LIMITR,O);
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容