david 發表於 12-9-27 13:48

新問題為什麼才跑1天的實際測試Alerts11.mdb檔案大小達400MB.

新問題為什麼才跑1天的實際測試Alerts11.mdb檔案大小達400MB.以下為strategy的程式請問那理有寫錯
為什麼Alerts11.mdb檔案大小達400MB? 謝謝 謝謝....

inputs: bs(10), moveEarn(10);

vars: tempHigh(0), tempLow(0), tempOpen(0), mc(0), loseCount(0);

if date <> date then begin
      tempHigh = 0;
      tempLow = 99999;
      tempOpen = opend(0);
      if PositionProfit(1) < 0 then loseCount = -1;
      if PositionProfit(1) >= 0 then loseCount = 0;
end;

mc = marketposition * currentcontracts;

if mc <> mc then begin
      tempHigh = 0;
      tempLow = 99999;
end;

if mc <> mc and PositionProfit(1) < 0 then loseCount = loseCount + 1;

if mc > 0 and high > tempHigh then tempHigh = high;
if mc < 0 and low < tempLow then tempLow = low;

if losecount < 2 and mc = 0 and time < 1329 then begin
      buy ("b1") next bar at tempOpen + bs stop;
      sell("s1") next bar at tempOpen - bs stop;
end;

if loseCount < 2 and mc > 0 and time < 1329 then begin
      sell("s2") next bar at tempHigh - 10 stop;
end;
if loseCount < 2 and mc < 0 and time < 1329 then begin
      buy ("b2") next bar at tempLow + 10 stop;
end;

if loseCount = 2 and mc > 0 and time < 1329 and tempHigh - 19 < entryprice(0) then begin
      exitlong ("ex-b") next bar at tempHigh - 10 stop;
end;
if loseCount = 2 and mc > 0 and time < 1329 and tempHigh - 19 >= entryprice(0) then begin
      sell("s3") next bar at tempHigh - 10 stop;
end;

if loseCount = 2 and mc < 0 and time < 1329 and tempLow + 19 > entryprice(0) then begin
      exitshort ("ex-s") next bar at tempLow + 10 stop;
end;
if loseCount = 2 and mc < 0 and time < 1329 and tempLow + 19 <= entryprice(0) then begin
      buy ("b3") next bar at tempLow + 10 stop;
end;


if time = 1329 and mc <> 0 then begin
      exitlong ("b-end") next bar at market;
      exitshort("s-end") next bar at market;
end;

david 發表於 12-9-27 14:27

謝謝回復
小弟學疏才淺 歷史資料也dump出來了?
不太懂程式那理錯了 感謝你的解答

david 發表於 12-9-27 16:24

謝謝sunsamy回復
查了一下我是昨天才重灌後沒跑歷史資料.
真正收集tick的資料也才2天.是不是我重灌須要特別的設定?
懇請解答
感謝你的解答

david 發表於 12-10-2 14:28

測試第5天後為什麼Alerts11.mdb檔案大小達1000MB?
之後使用insert strategy後一直出現如附圖
不知如何解?
感謝.感謝.

sunny 發表於 12-10-2 14:55

david 發表於 12-10-2 14:28 static/image/common/back.gif
測試第5天後為什麼Alerts11.mdb檔案大小達1000MB?
之後使用insert strategy後一直出現如附圖
不知如何解?


你的 Access 爆了 ...........

david 發表於 12-10-2 15:09

謝謝sunny回復
請問是否有方法可以解?
之前有發生過 Access 爆了之後重灌TS2000I就可以了
可是測試第5天後為什麼Alerts11.mdb檔案大小達1000MB
是不是我的strategy有問題.

感謝.感謝.

sunny 發表於 12-10-2 16:51

david 發表於 12-10-2 15:09 static/image/common/back.gif
謝謝sunny回復
請問是否有方法可以解?
之前有發生過 Access 爆了之後重灌TS2000I就可以了


那 Access 極限如此,
爆了, 您說有解嗎?

程式重灌只是又建了一個新的檔案,
重新開始而已, 問題依舊, 看起來好像可以了,
但您總不會每五天回測就要來個重灌吧!
這樣會瘋掉喔 ........

不然就用這邏輯, 用日期命名檔名, 寫個判斷,
到第四天建一個新的 Access 檔案, 重新開始,
依此循環, 應該就不會到極限了.

不然就用 Microsoft SQL Server 取代 Access 來做,
因為他們都是微軟出品, 至少相似度比較高,
但是每種版本授權費用都不同,
不然用免費的 MySQL 試試, 不知行不行就是了.

頁: [1]
查看完整版本: 新問題為什麼才跑1天的實際測試Alerts11.mdb檔案大小達400MB.