gryps2/UI-code/T-059_バックテスト時間計測.txt
super.admin ae3f0ebf03 convert
2025-05-30 14:58:21 +02:00

34 lines
No EOL
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 );
}
//+------------------------------------------------------------------+
}