代碼問(wèn)題 好奇怪,為什么信號(hào)會(huì)延后? [金字塔]
- 咨詢(xún)內(nèi)容:
應(yīng)該在 (diff>=0.03 or (hhv(h,10)-LLV(l,10))>=0.15) 滿足條件后,macd指標(biāo)出現(xiàn)金叉后,應(yīng)該馬上第二個(gè)K線就做交易,但為什么會(huì)經(jīng)常延后2,3根?是為什么?就是說(shuō),相交是需要2個(gè)K線判別的,第三根應(yīng)該馬上做交易的,但經(jīng)常延后2,3根開(kāi)倉(cāng),是為什么?
multipler:=10;
macd:=stkindi('','macd.macd1',0,datatype);
diff:=stkindi('','macd.diff',0,datatype);
atr:=stkindi('','atr.atr',0,datatype);
if cross(macd,0) and (diff>=0.03 or (hhv(h,10)-LLV(l,10))>=0.15) then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if cross(0,macd) and (diff>=0.03 or (hhv(h,10)-LLV(l,10))>=0.15) then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if openprofit/multipler>1.5*atr then begin
sell(1,0,marketr);
sellshort(1,0,market);
end
if openprofit<0 and abs(openprofit)/multipler>1.5*atr then begin
sell(1,0,marketr);
sellshort(1,0,market);
end - 金字塔客服:
是k線圖上信號(hào)延后了,還是開(kāi)倉(cāng)時(shí)比k線圖上信號(hào)慢了幾根k線?
- 用戶回復(fù):
k線圖上信號(hào)延后了,實(shí)際開(kāi)倉(cāng)還沒(méi)有測(cè)。現(xiàn)在只是看K線圖上的信號(hào)。不是每次都延后,有的時(shí)候延后,有的時(shí)候不延后。。不會(huì)插入截圖。。。
- 網(wǎng)友回復(fù):
http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=31614&page=3
論壇貼圖方式
- 網(wǎng)友回復(fù):
您好,您看一下,一共4次穿越,1,4次就是有延后的,2,3次是正常的
已經(jīng)上傳圖了,您能看見(jiàn)嗎?
[此貼子已經(jīng)被作者于2016-10-20 16:18:36編輯過(guò)]
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容