Here is the complete code:

#define ASSET_LIST "AssetsFix"
#define M1 (1/BarPeriod)
#define M5 (5/BarPeriod)
#define M30 (30/BarPeriod)

function run() {
set(LOGFILE|PLOTNOW);
setf(PlotMode,PL_FINE);
assetList(strf("%s.csv", ASSET_LIST));
BarPeriod = 1;

// Load the prices on 1 minute timeframe
TimeFrame = frameSync(M1);
vars highSmall = series(priceHigh());
vars lowSmall = series(priceLow());

// Load the prices on 5 minute timeframe
TimeFrame = frameSync(M5);
vars highMedium = series(priceHigh());
vars lowMedium = series(priceLow());

TimeFrame = frameSync(M30);
vars highLarge = series(priceHigh());
vars lowLarge = series(priceLow());

printf("\nhighSmall[1] %.8f", highSmall[1]);
printf("\nhighSmall[0] %.8f", highSmall[0]);
printf("\nlowSmall[1] %.8f", lowSmall[1]);
printf("\nlowSmall[0] %.8f", lowSmall[0]);


}

btw, I am planning to use sec barperiod but the result is the same previous high and low doesn't update only the current when using timeframe, while it works properly if i printed the using priceHigh(1) or priceLow(1)