protectedoverridevoid OnStartUp()
{
myTimer.Tick += new EventHandler (TimerEventProcessor);
myTimer.Interval = TimerInterval;
myTimer.Start();
}
privatevoid TimerEventProcessor(Object myObject, EventArgs myEventArgs)
{
TriggerCustomEvent(TestHandler, 0, myTimer.Interval);
}
privatevoid TestHandler(object state)
{
Print(DateTime.Now+": FiboConnector "+myTimer.Interval);
}
The interval has been set to 500 msec (so execute twice per second). After enabling the strategy, it prints the line each half a second in the output window. So far so good. After 100 lines I do get the following erro message in the log: "Error on trigger custom event: More than 100 subsequent user events" and the strategy stops running.
I know there is a hidden variable MaxProcessedEvents, but I would like to know why I get this message and how to prvent this. I can raise the MaxProcesseEvenets but than I will get the same problem only later in time. It seems that the call to the customer event is not cleared from memory after finishing? Do you have any idea how to solve this.
Kind regards,
Rene
Comment