Different time frame different entry condition in one afl

Hi,

I created different set of entry exit rule every time frame .That means if in 5 minute chart display only macd crossover buy signal,But if in fifteen minute chart display only moving average cross over buy signal .
example:iif (chart time frame is 5 minute ,macd cross over,iif (chart time frame is 15 minute ,moving average cross over,null);

thanks