As long as I leave the lines of code like this:
if (State == State.Configure)
{
myTimer.Tick += new EventHandler(TimerEventProcessor);
myTimer.Interval = 1000;
myTimer.Start();
}
everything works fine and it prints out just as expected
But because I need my timer to start counting right on the open of a bar (isfirsttick is not precisely enough for me), I tried to put the correlating line of code into bthe onbarupdate section like this:
protected override void OnBarUpdate()
{
if (myTimer.Enabled)
{
return;
}
myTimer.Start();
Print("Timer started");
}
It prints out that the timer has been started, but the timer itself seems to not do anything since there are no timer events printed from the MyCustomHandler Method on the output window anymore.
Comment