Hi 3DCat, I'm using the default Zorro data (and I actually reset it this morning to be extra sure). However, I do have it set with my IBFX Assets file, so I will go back and double check this with all the Zorro defaults.

I did a little more digging on this. It seems that the strange behavior happens only on the Trend trading section, which uses a stop of up to 8 * ATR(100), depending on optimization.

Here is the relevant code section for this (note it is from Workshop 6_2, I only added the OptimalF conditions):
Code:
function tradeTrend()
{
	vars Price = series(price());
	vars Trend = series(LowPass(Price,optimize(250,100,1000)));

	Stop = optimize(4,2,8) * ATR(100);
	Trail = 0;
 
	if(valley(Trend) && OptimalFLong > 0) //long setup, known profitable
	{
		// reinvest the square root of profits
		//var MarginLong = sqrt(WinLong-LossLong)*OptimalFLong;
		//Margin = clamp(MarginLong, 5, 100); //max $1000 per trade

		enterLong();
	}
	
	else if(peak(Trend) && OptimalFShort > 0) //short setup, known profitable
	{
		// reinvest the square root of profits
		//var MarginShort = sqrt(WinShort-LossShort)*OptimalFShort;
		//Margin = clamp(MarginShort, 5, 100); //max $1000 per trade

		enterShort();
	}
}



I'm attaching here also a screenshot showing AUDUSD with all CNTR-trend filtered out, and plotting the ATR(100). This seems to indicate a problem where Zorro somehow "forgot" to close some trailed trades.

Next I will check the default Zorro data and Assets, and then dig deeper into the actual trade-by-trade to see if I can spot the specific offending trades.

Attached Files Workshop6_2_dusktrader_AUDUSD_TRND.png