Hi Tickstory
Here's what i did.
1. Goto tickstory and download the historical data for GBPAUD from 2011-01-01 to 2021-06-15
2. Tickstory > Launch MT4 (tried both direct and via advanced tester beta)
3. Create a simple EA (code below)
//+------------------------------------------------------------------+
//| Test.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//|
https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "
https://www.mql5.com"
#property version "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
Print("M5 : ", iTime(Symbol(), PERIOD_M5, 0));
Print("M15 : ", iTime(Symbol(), PERIOD_M15, 0));
Print("H1 : ", iTime(Symbol(), PERIOD_H1, 0));
Print("H4 : ", iTime(Symbol(), PERIOD_H4, 0));
Print("D1 : ", iTime(Symbol(), PERIOD_D1, 0));
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Test.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//|
https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "
https://www.mql5.com"
#property version "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
Print("M5 : ", iTime(Symbol(), PERIOD_M5, 0));
Print("M15 : ", iTime(Symbol(), PERIOD_M15, 0));
Print("H1 : ", iTime(Symbol(), PERIOD_H1, 0));
Print("H4 : ", iTime(Symbol(), PERIOD_H4, 0));
Print("D1 : ", iTime(Symbol(), PERIOD_D1, 0));
}
//+------------------------------------------------------------------+
When testing Period is set to H1
2021.06.23 06:40:57.435 2021.01.06 20:44:40 Test GBPAUD.sq,H1: D1 : 2021.01.06 00:00:00
2021.06.23 06:40:57.435 2021.01.06 20:44:40 Test GBPAUD.sq,H1: H4 : 2021.01.06 20:00:00
2021.06.23 06:40:57.435 2021.01.06 20:44:40 Test GBPAUD.sq,H1: H1 : 2021.01.06 20:00:00
2021.06.23 06:40:57.435 2021.01.06 20:44:40 Test GBPAUD.sq,H1: M15 : 1970.01.01 00:00:00
2021.06.23 06:40:57.435 2021.01.06 20:44:40 Test GBPAUD.sq,H1: M5 : 1970.01.01 00:00:00
When testing Period is set to M5
2021.06.23 06:42:49.087 2021.01.06 15:19:52 Test GBPAUD.sq,M5: D1 : 2021.01.06 00:00:00
2021.06.23 06:42:49.087 2021.01.06 15:19:52 Test GBPAUD.sq,M5: H4 : 2021.01.06 12:00:00
2021.06.23 06:42:49.087 2021.01.06 15:19:52 Test GBPAUD.sq,M5: H1 : 2021.01.06 15:00:00
2021.06.23 06:42:49.087 2021.01.06 15:19:52 Test GBPAUD.sq,M5: M15 : 1970.01.01 00:00:00
2021.06.23 06:42:49.087 2021.01.06 15:19:52 Test GBPAUD.sq,M5: M5 : 2021.01.06 15:15:00