Ok then can you please explain why I get price curves with offset start/end values when I run a script like this over my entire data?

function run()
{
set(PLOTNOW);
StartDate = 20150101;
EndDate = 20161231;
BarPeriod = 1440;

NumTotalCycles = 50;
Detrend = SHUFFLE;

PlotWidth = 600;
PlotHeight1 = 300;
ColorUp = ColorDn = 0;
plot(strf("#Cycle_%d", TotalCycle), priceClose(), MAIN, color(100*TotalCycle/NumTotalCycles, BLUE, RED, GREEN));
}

see also the attached output. The values are relatively close, but it was my understanding that they should start/end at exactly the same value.

Attached Files test_EURUSD.png