請教各位前輩 我遇到掛上策略訊號後 第一天的買點都會不正確 問題如下:
如果我只開一天圖(1分k) ex;資料區間2016/7/7~20167/7 不管我策略訊號寫什麼 掛上去都買在9:37的位置 如果我開兩天以上的圖 ex:;資料區間2016/7/6~20167/7 則第一天同樣買錯位置 第二天策略則正確顯示買點 請問有前輩可指點為什麼 以及如何調整嗎? 我只是想開當天資料做當沖盤測試 程式如下: //record 0845~0905 highLine and lowLine if time>=0845 and time<=0905 then begin value1=HighD(0); value2=LowD(0); end; //break line to buy or sell if time>=0905 and time<=1300 then begin buy("buy") at next bar value1+1 stop; sellshort("sell") at next bar value2-1 stop; end; //setsoploss 20 pint and break line setstoploss(20* bigpointvalue); if marketposition=1 then sell("BX1") at next bar value2-1 stop; if marketposition=-1 then buytocover("SX1") at next bar value1+1 stop; //offset on 1300 if time>1300 and marketposition=1 then sell("BX2") next bar on open; if time>1300 and marketposition=-1 then buytocover("SX2") next bar on open;