Thanks, but if I add an hour() condition to the complete function run() I get this error:

Quote:
Error 041: Inconsistent series calls / too many series
Number or order of series calls in the script are different between run cycles, due to a bug in the script. Make sure that all series calls - or function calls that internally create series, such as LowPass, ATR, etc. - have the same order in every run, and are not skipped with if statements. Make also sure that your script does not generate series in tick-based intrabar functions (TMF, tick) or in endless loops.


And I think it's not enough to put the entry and exit statements in an hour() condition, because I also don't want the indicators to be calculated for a specific time.

/Matt