I have a general suggestion for improving the NT8 QA suite.
To help locate possible multi-threading issues, please consider placing artificial random delays throughout the code, especially within the indicators.
For example, a case was sent earlier this week to Shawn where the simple SMA indicator was modified by adding a small delay. When alerts are created on this indicator it causes some error and the chart stops functioning and the tool must be restarted to clear it. It only happens if that delay is there.
protected override void OnBarUpdate()
{
// Add a delay to simulate performing a long calculation like the real case does.
// The time can be adjusted but too small and it doesn't show the bug.
//
Thread.Sleep(15); // or better to use a new Random value each iteration.
//...
}
I offer this suggestion because currently there are few dedicated software tools available to thoroughly exercise/test multi-threaded C# code.
Its like in the days of writing C or C++ before the memory checking tools like "Purify" came along. There used to be tons of memory leaks.
Thanks,
Chris
The related issue:
Comment