為什么不停的,每根K線都開平倉?這源碼有問題?很簡單的 [金字塔]
- 咨詢內容:
p:=26;s:=12;m:=9;atrm:=20;
multipler:=10;pp:=NUMTOSTR(p,0);ss:=NUMTOSTR(s,0);mm:=NUMTOSTR(m,0);atrmm:=NUMTOSTR(atrm,0);macd:=stkindi('','macd.macd1('&pp&','&ss&','&mm&')',21,75);diff:=stkindi('','macd.diff('&pp&','&ss&','&mm&')',21,75);atr:=stkindi('','atr.atr('&atrmm&')',21,75);
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 - 金字塔客服:
cross(macd,0) and diff>=0.03 or (hhv(h,10)-LLV(l,10))>=0.15
這句里面的or是先判斷還是and先判斷?
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容