Hm... this is how I think my code works (obviously it isn't, but why?):

1) TimeFrame is set in run()

2) TimeFrame gets passed on to indicator()

3) indicator() creates local series with 200 M15 or 200 D1 bars, depending on TimeFrame

4) DominantPeriod uses the last 100 M15 or 100 D1 bars. By the way, if 100 bars is needed, what's the value the manual is talking about then: "valid range = 10..60"