代碼問題 好奇怪,為什么信號會延后? [金字塔]
- 咨詢內容:
應該在 (diff>=0.03 or (hhv(h,10)-LLV(l,10))>=0.15) 滿足條件后,macd指標出現金叉后,應該馬上第二個K線就做交易,但為什么會經常延后2,3根?是為什么?就是說,相交是需要2個K線判別的,第三根應該馬上做交易的,但經常延后2,3根開倉,是為什么?
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線圖上信號延后了,還是開倉時比k線圖上信號慢了幾根k線?
- 用戶回復:
k線圖上信號延后了,實際開倉還沒有測。現在只是看K線圖上的信號。不是每次都延后,有的時候延后,有的時候不延后。。不會插入截圖。。。
- 網友回復:
http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=31614&page=3
論壇貼圖方式
- 網友回復:
您好,您看一下,一共4次穿越,1,4次就是有延后的,2,3次是正常的
已經上傳圖了,您能看見嗎?
[此貼子已經被作者于2016-10-20 16:18:36編輯過]
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容