又重新寫了一個簡單的進場機制測試,結果還是一樣,看官網討論區也有這個問題,看樣子只能另想辦法了!
- variable: SetB(0), SetS(0);
- once cleardebug;
- if o > h[1] and SetB < 3 then begin
- buy this bar at close;
- SetB = SetB + 1;
- SetS = 0;
- print(date, ", ", close, ", ", SetB, ", ", SetS, ", ", entryprice, " ,", marketposition * currentcontracts );
- end;
- if o < L[1] and SetS < 3 then begin
- sellshort this bar at close;
- SetS = SetS + 1;
- SetB = 0;
- print(date, ", ", close, ", ", SetB, ", ", SetS, ", ", entryprice, " ,", marketposition * currentcontracts );
- end;
複製代碼
1110323.00, 8448.00, 0.00, 1.00, 0.00 , 0.00
1110325.00, 8579.00, 1.00, 0.00, 8448.00 , -1.00
1110330.00, 8590.00, 2.00, 0.00, 8579.00 , 1.00
1110406.00, 8838.00, 3.00, 0.00, 8579.00 , 2.00
1110419.00, 8627.00, 0.00, 1.00, 8579.00 , 3.00
1110420.00, 8791.00, 1.00, 0.00, 8627.00 , -1.00
1110421.00, 8993.00, 2.00, 0.00, 8791.00 , 1.00
1110426.00, 8970.00, 0.00, 1.00, 8791.00 , 2.00
1110427.00, 9060.00, 1.00, 0.00, 8970.00 , -1.00
1110428.00, 9010.00, 2.00, 0.00, 9060.00 , 1.00
1110511.00, 9020.00, 3.00, 0.00, 9060.00 , 2.00
1110512.00, 9030.00, 0.00, 1.00, 9060.00 , 3.00
1110516.00, 8922.00, 0.00, 2.00, 9030.00 , -1.00
1110517.00, 8914.00, 0.00, 3.00, 9030.00 , -2.00
1110519.00, 8840.00, 1.00, 0.00, 9030.00 , -3.00
1110523.00, 8738.00, 0.00, 1.00, 8840.00 , 1.00
1110526.00, 8787.00, 1.00, 0.00, 8738.00 , -1.00
1110530.00, 8820.00, 0.00, 1.00, 8787.00 , 1.00
1110531.00, 9021.00, 1.00, 0.00, 8820.00 , -1.00
1110602.00, 9031.00, 0.00, 1.00, 9021.00 , 1.00
1110610.00, 8829.00, 1.00, 0.00, 9031.00 , -1.00
1110613.00, 8744.00, 0.00, 1.00, 8829.00 , 1.00
1110616.00, 8493.00, 0.00, 2.00, 8744.00 , -1.00
1110622.00, 8444.00, 1.00, 0.00, 8744.00 , -2.00
1110627.00, 8337.00, 0.00, 1.00, 8444.00 , 1.00
1110628.00, 8308.00, 1.00, 0.00, 8337.00 , -1.00
1110701.00, 8570.00, 2.00, 0.00, 8308.00 , 1.00
1110704.00, 8603.00, 3.00, 0.00, 8308.00 , 2.00
1110711.00, 8598.00, 0.00, 1.00, 8308.00 , 3.00
1110712.00, 8419.00, 0.00, 2.00, 8598.00 , -1.00
1110720.00, 8698.00, 1.00, 0.00, 8598.00 , -2.00
1110722.00, 8691.00, 2.00, 0.00, 8698.00 , 1.00
1110725.00, 8608.00, 0.00, 1.00, 8698.00 , 2.00
1110728.00, 8728.00, 0.00, 2.00, 8608.00 , -1.00
1110802.00, 8574.00, 0.00, 3.00, 8608.00 , -2.00
1110816.00, 7773.00, 1.00, 0.00, 8608.00 , -3.00
1110818.00, 7500.00, 0.00, 1.00, 7773.00 , 1.00
1110819.00, 7251.00, 0.00, 2.00, 7500.00 , -1.00 |