You can influence the behaviour of the TMF with the return values but you don't have to. Normally in trading the TMF runs every tick and therefore you can check your conditions each moment you like.
Code:
int DoTrade() {
if(TradeIsNewBar)
// this condition is checked only once per bar
if(hour() % 2 == 0 && ...)
// this condition is checked only in even hours
if(hour() == ... && minute() == ... && ...)
// this is checked e.g. at a special hour/minute combination
return 0;
}