老師幫我看看
作者:金字塔 來源:cxh99.com 發(fā)布時間:2017年05月21日
- 咨詢內容:
老師好 我這樣為什么不能實現(xiàn)每個信號下只開平倉一次呢 只要止盈或者止損后就會繼續(xù)開平倉 麻煩老師幫忙給改正一下 謝謝 SS:=1;//ss
if B8<=0 then begin,sellshort(1,holding,thisclose),orderqueue;
buy(holding=0 and bj=0,ss,thisclose),orderqueue;
end
if bj=1 and B8<=0 and holding=0 and exitbars>1 then begin
buy(1,ss,thisclose);
bj:=0;
endif B8>0 then beginsell(1,holding,thisclose),orderqueue;
buyshort(holding=0 and bj=0,ss,thisclose),orderqueue;
end
if bj=1 and B8>0 and holding=0 and exitbars>1 then begin
buyshort(1,ss,thisclose);
bj:=0;
end
- 金字塔客服:
就是止盈或者止損后本信號內不再開倉
- 用戶回復:
你代碼里平倉后就反手開倉了,那個平倉是你的止盈止損嗎?
如果這個是止盈止損 怎么緊接著就反手開倉 這和你要求的止盈止損后本根不再開倉不是剛好相反嗎?
- 網(wǎng)友回復:
貼出你完整的代碼,不知道你其中的部分條件是什么。
圖表每條交易語句只會在同一根K上開倉一次。不知道你說的指的是什么意思、
- 網(wǎng)友回復:
回三樓 就是止盈止損后 沒有反手開倉是接著上次的信號繼續(xù)開倉了