You also need to prevent printing while run() is being used during the Lookback period. You can check for this with is(LOOKBACK).

Behold:
Code:
function run(){
	assetList("AssetsOanda.csv");
	BarPeriod = 1;
	LookBack = 300;
	StartDate = 2013;
	EndDate = 2018;
	
	asset("GBP/USD");
	vars series2 = series(priceClose());
	
	asset("EUR/USD");
	vars series3 = series(priceClose());

	var cor = Correlation(series2, series3, 240);
	
	if(!is(LOOKBACK))
		printf("\n %f", cor);
}