My associate developed a MultiDivergence strategy for NT8 that places long and short trades based on the number of divergences. It runs perfectly on his VPS (Windows Server 2016). However, when I try to run it on my VPS (also Windows Server 2016, NT8 version 8.1.3.1, Microsoft Visual Studio Community 2022), it compiles fine but fails during execution
When I enable the strategy on market replay data using the Playback feature, it stops itself and I get the following 2 error messages in the logs:
| 06/07/2024 00:29:06 | Default | Strategy 'Divergence_A': Error on calling 'OnBarUpdate' method on bar 36288: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart. |
| 06/07/2024 00:29:06 | Default | Indicator 'MultiDivergence': Error on calling 'OnBarUpdate' method on bar 36288: Index was outside the bounds of the array. |
This issue is puzzling because my setup is identical to my associate's: same VPS, data set, indicators, strategies, lookback period (200 bars), and days to load (20 days)... It works on his machine but not mine somehow.
To debug this, I used Microsoft Visual Studio Community 2022. I managed to attach the NT8 process in the debug feature, as you can see there the debug interface pop up:
So far everything is going well but when I try to enable the strategy on NT8 I get this message:
Which just crash the NT8 app when I click on OK...
So here's where I am stuck, I don't know how to handle this as I'm very new to C# and have basically zero knowledge at how to debug such things, how Agile.net works, how the dlls files works etc...
I found out the references list applied to my strategy is this:
But I don't know what to do with it and also idk which .dll makes the Agile.net "obfuscator" happen...
The strategy uses ninZaRenko bars, but the error persists even with traditional candlesticks.
I collaborated with my associate and a mentor who is an expert in NT8 development and C# to find a solution for this issue, but we reached a dead end...
I'm feeling overwhelmed with these errors. Could you help me resolve the initial errors in the OnBarUpdate method and guide me on fixing the MVSC 2022 debug issue? I need this debug feature for future strategies as well.
Thanks in advance for your assistance,
H.

Comment