Thanks jcl. It's so much fun being a junior programmer again & making such idiotic mistakes... frown

At least now it's maybe sunk in that optimize() is not a "meta" process set up once at the beginning of strategy execution, but rather implemented as a regular function call...

But BarPeriod may be... Thanks for the TimeFrame code.