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