I codeed this but it says Error 045: Negative price offset at bar 1.
What do it mean?

Code:
function run(){
	
	
	int dist = 24;
	
	vars high = series(priceHigh(0 - dist / 2));
	var  lasthigh = MaxVal(high,dist);
	vars low = series(priceLow(0 - dist / 2));
	var lastlow = MinVal(low,dist);
	
	if(priceHigh(0) == lasthigh)
	enterShort();
	
	if(priceLow(0) == lastlow)
	enterLong();
}