[討論]日內(nèi)交易對(duì)交易次數(shù)的限制
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2014年02月12日
- 咨詢內(nèi)容:
想對(duì)日內(nèi)交易的次數(shù)進(jìn)行限制(如下)。1、日內(nèi)交易連續(xù)虧損兩次,即當(dāng)日不再開倉。2、日內(nèi)交易開倉2次后,即當(dāng)日不再開倉。求指導(dǎo),謝謝!
- 金字塔客服:
1.虧損兩次不交易variable:k1:=1; if numprofit(1)<0 and numprofit(2)<0 and totaldaytrade>=2 then k1:=-1;在開倉條件中加 and k1>0
2.日內(nèi)開倉兩次不交易
if 開倉條件 and totaldaytrade<2 then
- 用戶回復(fù):
不好意思,第1條不對(duì)
r1:=todaybar;r2:=numlosstrade-ref(numlosstrade,r1-1);
if 開倉條件 and r2<2 then
- 網(wǎng)友回復(fù):
不好意思,現(xiàn)在才回復(fù)你。我已經(jīng)會(huì)編寫了,跟你的思路差不多。非常感謝你!