function run()
{
StartDate = 20080101;
EndDate = 20120101;
BarPeriod = 15;
//"AUD/CAD",
while(asset(loop("AUD/CHF","AUD/JPY","AUD/NZD","AUD/USD","CAD/CHF","CAD/JPY",
"CHF/JPY","EUR/AUD","EUR/CAD","EUR/CHF","EUR/GBP","EUR/JPY","EUR/NZD",
"EUR/USD","GBP/AUD","GBP/CAD","GBP/CHF","GBP/JPY","GBP/NZD","GBP/USD",
"NZD/CAD","NZD/CHF","NZD/JPY","NZD/USD","USD/CAD","USD/CHF","USD/JPY")))
{
var tdiff = (wdate() - wdate(1)); //time difference in days of the last consecutive bars
//search for time differences at 1.5 times longer than BarPeriod:
if(tdiff > (BarPeriod/1440)*1.5 && tdiff < 1) //1 day = 1440 minutes....
{
printf("n%d-%02d-%02d %02d:%02d %s gap: %.0f minutes missing",
year(), month(), day(), hour(), minute(), Asset, (wdate() - wdate(1))*1440);
}
}
}