I get the same performance both ways if I modify the code as follows.

Code:
function run() {
  LookBack = 500;
  StartDate = 2010;
  EndDate = 2015;
  asset("EUR/USD");

  vars Price = series(price());
  vars Trend = series(LowPass(Price,500));
	
  // ISSUE: uncommenting the line below gives a different test result!
  //vars MMI_Raw = series(MMI(Price,300));

  Stop = 4*ATR(100);
	
  if(valley(Trend))
    enterLong();
  else if(peak(Trend))
    enterShort();

}


Last edited by AndrewAMD; 08/15/18 15:10. Reason: See remarks below.