Please see the attached code & screen dumps.
I ran this backtest and it missed obvious logic.
See Test9.cs: Notice it is supposed to exit long trades when the LinReg goes against the Long trade.
See NT-Bug21 for the Setup Screen used with Test9.
See NT-Bug23 for the LinReg values...today LR[0] = 1116.35, LR[1] = 1116.44
Obviously, the Long trade should have exited. This screen dump shows the IF statement just before the ExitLong command should have been run.
I have run this code several times. I used the debugger 5 times to get these screen dumps. As soon as I try to execute this line...the PC & NT totally lock up. If I wait a while, I can get back into the PC, but NT is dead. I cannot restart NT, because Windows says its already running. I had to reboot and run everything again.
When I try to start NT again, Almost All Workspace settings are gone...No Charts, No default settings, etc. Other times, it seems like only the Charts are gone.
If I run at full speed, AND it gets past this problem, you can easily see from the attached screen dump NT-Bug 25...that Not Only did the LinReg turn down, but the momentum Also dropped below 0...which is the other part of the logic that was missed.

Comment