// GMT0ブローカー禁止・サマータイム自動調整 string BrokerName0 = "Ava Trad"; // Ava "Ava Trade Ltd."; string BrokerName1 = "Exness T"; // Exness "Exness Technologies Ltd"; string BrokerName2 = "HF Marke"; // HFM "HF Markets (SV) Ltd.";"HF Markets(SV)Ltd."; string BrokerName3 = "Tradexfi"; // XM "Tradexfin Limited"; string BrokerName4 = "FinTrade"; // XM "FinTrade Limited"; string BrokerName5 = "NOTESCO "; // IronFX "NOTESCO Ltd"; int OnInit() { //+------------------------------------------------------------------+ // GMT0ブローカー稼働禁止 if (StringSubstr(AccountCompany(), 0, 8) == BrokerName0 || StringSubstr(AccountCompany(), 0, 8) == BrokerName1 ) { Alert( WindowExpertName() + " cannot run on brokers at GMT0" + "\n" + "GMT0のブローカーは稼働できません" ); return(INIT_FAILED); } //+------------------------------------------------------------------+ // サマータイム自動調整 if (StringSubstr(AccountCompany(), 0, 8) == BrokerName1) { Summertime = 0; } else if (StringSubstr(AccountCompany(), 0, 8) == BrokerName2 || StringSubstr(AccountCompany(), 0, 8) == BrokerName3 || StringSubstr(AccountCompany(), 0, 8) == BrokerName4 || StringSubstr(AccountCompany(), 0, 8) == BrokerName5 ) { Summertime = 2; } else { Summertime = 1; } Print(Summertime == 0? "No summertime" : Summertime == 2? "European(UK) summertime" : "American summertime"); //+------------------------------------------------------------------+ return(0); }