Yes, you must set HEDGING here in Train mode. Otherwise your second trade immediately closes the first and the advise function can not get any useful result.

The prediction accuracy can also be 0 when the parameters are totally uncorrelated to the trade result.

This is a test script:

Code:
var signal(var val1,var val2)
{
	return (val2-val1)/PIP;
}

void run()
{
	BarPeriod = 1440;
	set(RULES|HEDGING);
	asset("SPX500");
	
	var *Close = series(priceClose()),
		*High = series(priceHigh()), 
		*Low = series(priceLow()); 
	
	var LPH = LowPass(High,100),
		LPL = LowPass(Low,100);

	Stop = 50*PIP; 
	TakeProfit = 50*PIP;

	var S1 = signal(*Close,LPH),
		S2 = signal(*Close,LPL),
		S3 = signal(*Close,*High),
		S4 = signal(*Close,*Low),
		S5 = signal(LPH,LPL);
			
	if(adviseLong(DTREE,0,S1,S2,S3,S4,S5) > 0)
		enterLong();
	if(adviseShort(DTREE,0,S1,S2,S3,S4,S5) > 0)
		enterShort();
}