try this:
Code
	if (!TradeIsOpen && EMA50[0] > EMA200[0] && crossOver(MacdHist, 0)){
		enterLong();
	}