Originally Posted By: jcl
Yes, that's the optimized version with 3x higher profit:

Code:
function run()
{
	BarPeriod = 240;
	StartDate = 2006;
	NumYears = 7;
	NumWFOCycles = 12;
	set(PARAMETERS|TESTNOW);
	
	var *Price = series(price());
	var *LP5 = series(LowPass(Price,5));
	var *LP10 = series(LowPass(Price,optimize(10,6,20))); 
	var *RSI10 = series(RSI(Price,10)); 
	Stop = optimize(5,1,10)*ATR(30);
	int Delay = 3; 
	
	static int crossed = 0;
	if(crossOver(LP5,LP10))
		crossed = Delay;
	else if(crossUnder(LP5,LP10))
		crossed = -Delay;
		
	if(crossed > 0 && crossOver(RSI10,50)) {
		enterLong();
		crossed = 0;
	} else if(crossed < 0 && crossUnder(RSI10,50)) {
		enterShort();
		crossed = 0;
 	} else
		crossed -= sign(crossed);
}



Equity curve:



Sorry for waking up an old thread, but I wanted to see if I could reproduce these results. I'm running with Zorro 1.58, I've copy pasted the code above, and I'm not seeing anywhere near the same equity curve.


Attached Files
Zorro.png (230 downloads)
Last edited by Dalla; 05/11/17 05:33.