Here's one that I use to plot Sharpe ratios from different cycles with the same script.

An example of where I use this is in machine learning research where the learning algorithm has a non-deterministic component (for example, the initial weights of a neural network), and I want to test the stability of performance. Also, if you set the BALANCED argument of adviseLong(), Zorro can generate different training data for your machine learning models in each training run. Testing them over several cycles can help assess the stability of the model.

Code:
void plotSharpeCycles() // calculate sharpe ratio of individual trade cycles via Welford algorithm
{
	if(is(EXITRUN)) 
	{
		var n = 0;
		var mean = 0;
		var M2 = 0;
		var delta;
		var variance = 0;
		for(all_trades)
		{
			n += 1;
			delta = TradeProfit - mean;
			mean += delta/n;
			M2 += delta*(TradeProfit - mean);
			variance = M2/(n-1);			
		}
		var sharpe = sqrt(252)*mean/sqrt(variance);
		plotBar("",TotalCycle,TotalCycle,0,SUM|BARS|LBL2,BLUE);
		plotGraph("Sharpe",TotalCycle,sharpe,LINE,RED);
	}
}