Skip to content

Instantly share code, notes, and snippets.

View frgmt's full-sized avatar
🏠
Working from home

fragment frgmt

🏠
Working from home
View GitHub Profile
@frgmt
frgmt / GetJSTHour.mq4
Created August 26, 2020 02:31
MQLでJST取得
//+------------------------------------------------------------------+
//| 日本時間との差分取得 |
//+------------------------------------------------------------------+
int GetDiffHour()
{
datetime DiffTime = TimeCurrent() - TimeGMT();
int DiffHour = TimeHour(DiffTime);
// TimeCurrentとTimeGMTの秒数がずれることがあるので、59分とかは繰り上げる
if (TimeMinute(DiffTime) > 30) {
DiffHour += 1;