so, I have question:

how to get the same price in the exact time? For 2.1.2017 00:00:00 - price don't have same value

BarPeriod=60
TimeFrame=1
Date: 02.01.17 00:00:00 Price: 1.05265 Trend: 1.05179

BarPeriod=5
TimeFrame =12
Date: 02.01.17 00:00:00 Price: 1.05301 Trend: 1.05455

BarPeriod=5
TimeFrame =1
Date: 02.01.17 00:00:00 Price: 1.05261 Trend: 1.05348

BarPeriod=1
TimeFrame =1
Date: 02.01.17 00:00:00 Price: 1.05259 Trend: 1.05289

BarPeriod=1
TimeFrame =0
Date: 02.01.17 00:00:00 Price: 1.05290 Trend: 1.05290

Code:
printf("nDate: %s Price: %.5f Trend: %.5f",datetime(),Price[0],Trend1[0]);