thanks for your replies. over complicated, yep! but I want to learn, and making mistakes is a good way. especially when someone has the patience to point it out (swingtraderkk).

I unintentionally used (1) instead of (0) for last closed bar. some of my best trading methodology has been discovered by accident.

Code:
function run()
{
	Stop = (priceClose(1) - 1.5*ATR(100));
	TakeProfit = 300*PIP;
	Trail = 1.0*ATR(100);
	
	vars Price = series(priceClose());
	vars BiasLarge = series(SMA(Price,70));
	
	if (priceClose(1) > BiasLarge[1]
	 and priceHigh(1) < priceHigh(2)
	  and priceLow(1) < priceLow(2))
		enterLong(1,(priceHigh(1) + 3*PIP));
	if (priceClose(1) < BiasLarge[1]
	 and	priceHigh(1) > priceHigh(2)
	 	and priceLow(1) > priceLow(2))
	 	enterShort(1,(priceLow(1) - 3*PIP));
}



Peter