34 lines
1 KiB
Text
34 lines
1 KiB
Text
|
// バックテスト時間計測
|
||
|
uint StartingTimestamp;
|
||
|
|
||
|
|
||
|
int OnInit()
|
||
|
{
|
||
|
//+------------------------------------------------------------------+
|
||
|
// バックテスト時間計測
|
||
|
StartingTimestamp = GetTickCount();
|
||
|
//+------------------------------------------------------------------+
|
||
|
return(0);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
void OnDeinit(const int reason)
|
||
|
{
|
||
|
//+------------------------------------------------------------------+
|
||
|
// バックテスト時間計算・出力
|
||
|
if (IsTesting())
|
||
|
{
|
||
|
uint EndingTimestamp = GetTickCount(); //始動時間
|
||
|
uint BT_Time = EndingTimestamp - StartingTimestamp;
|
||
|
uint msec_unit = BT_Time % 1000;
|
||
|
datetime temp_date = BT_Time / 1000;
|
||
|
|
||
|
Print( "バックテスト時間= ",
|
||
|
TimeHour(temp_date), "hour ",
|
||
|
TimeMinute(temp_date), "min ",
|
||
|
TimeSeconds(temp_date), ".", msec_unit, "sec ",
|
||
|
" 元データ= ", BT_Time );
|
||
|
}
|
||
|
//+------------------------------------------------------------------+
|
||
|
}
|