Hello Everyone,
New to the forum and zorro. I've just implemented the example from the book script alice 2a.

I noticed that when performing backtest as in the book, the equity curve is identical, however upon adding "BarMode = BR_LEISURE"

Zorro doesnt execute trades on signal crossovers even outside the weekends. I'm just puzzled as the backtest looks plain wrong and I'm not sure why would the flag cause almost no execution on trades.

Code
 
// Workshop 5: Counter trend trading ///////////////////

function run()
{
	StartDate = 2013;
	EndDate = 2023; // fixed simulation period
	BarPeriod = 240;	// 4 hour bars
	
	//BarMode = BR_LEISURE;	// don't trade at weekend


// calculate the buy/sell signal
	vars Prices = series(price());
	var Period = 30; 
	vars Cycles = series(BandPass(Prices,Period,2));
	vars Signals = series(FisherN(Cycles,500));
	var Threshold = 1;

// buy and sell
	LifeTime = 100;
	Trail = Stop = 10*ATR(100);
	MaxLong = MaxShort = -1;
	if(crossUnder(Signals,-Threshold))
		enterLong(); 
	else if(crossOver(Signals,Threshold))
		enterShort();

// plot signals and thresholds
	plot("Cycles",Cycles,NEW,RED);
	plot("Signals",Signals,NEW,GREEN);
	plot("Threshold+",Threshold,0,BLACK);
	plot("Threshold-",-Threshold,0,BLACK);
	set(LOGFILE+PLOTNOW);



Anyone could shed some light on that?

Backtest results without the BR_Leisure flag and with attached.
Cheers

Attached Files noLeisureFlag_EURUSD.pngleisureFlag_EURUSD.png