Your code is correct. it is just that a simultaneous crossover in both
time frames might be a rare event.
try:
|Rule = Cross( *Close*, EMA( *Close*, 45 ) );|
|Rule_time2 = *Close* >EMA( *Close*, 45 ) ;|
I also noticed that using time functions with |TimeFrameSet|() does not
return correct results.
Not sure this topic was addressed before.
Because I like trade 2 different time frames (5 and 60 minutes)...
I tried to create an exploration with same conditions to be tested
(filtered) on 2 the different time frames but it gives inconsistent
results and I can't fix it.
Here is what I have (I just give an example of a standard condition):
Rule = cross( close, ema( close, 45 ) );
Filter = rule;
AddColumn(TimeNum(), "Time");
AddColumn(rule, "voila!", 1 );
TimeFrameSet( 3600);
Rule_time2 = cross( close, ema( close, 45 ) );
Filter = rule_time2;
AddColumn(TimeNum(), "Time");
AddColumn(rule_time2, "voila! in hourly", 1 );
Timeframerestore();
Any help most appreciated - thank you,
Carl