Often you want to debug a script and observe how its variables change in every run. We have a lite-C debugger, but it's not yet implemented in Zorro. Until then, you can debug a script with a simple message box. Example:

Code:
function run()
{
	var *Price = series(price());
	var *Trend = series(LowPass(Price,1000));
	Stop = 4*ATR(100);
	
// Display a message box with the variables to be observed
// Click [Yes] for a single step, [No] for closing the box
	static int debug = 1;
	if(debug) debug = msg(
		"Price = %.5f, Trend = %.5f, Stop = %.5f",
		Price[0],
		Trend[0],
		Stop);
	
	
	if(valley(Trend))
		enterLong();
	else if(peak(Trend))
		enterShort();
}