Dear all,

I have the following script:

Code
#include <default.c>
function run(){
	StartDate = 20190101;
	EndDate = 20200101;
	BarPeriod = 15;

	printf("== %s:\n", strdate("%Y-%m-%d %H:%M"));
	TimeFrame = 1;
	printf("price close M15: %.5f\n", priceClose(1));
	TimeFrame = 4;
	printf("price close H1: %.5f\n", priceClose(1));
	printf("\n");
}


I use priceClose(1) because priceClose(0) gives the current price. So I would except that this way the script should run in every 15 minutes, therefore the "price close H1" should change in just every fourth run - but it changes in every running cycle.

Code
== 2019-01-02 18:45:
price close M15: 1.13307
price close H1: 1.13371

== 2019-01-02 19:00:
price close M15: 1.13284
price close H1: 1.13359

== 2019-01-02 19:15:
price close M15: 1.13287
price close H1: 1.13313


I assumed that the last candle in H1 shouldn't change every time, only in hour-turn. What am I missing?
Thank you!