Sure, enter at market when the price crosses the TEMA _and_ the first condition was met within the last n bars.