The NinjaTrader documentation below does not mention the enormous time savings that compiling with Debug Mode can yield during testing, even when Visual Studio is not available.
o Debugging your NinjaScript Code http://www.ninjatrader-support2.com/vb/showthread.php?t=3418
o Indicator: Using Try-Catch Blocks http://www.ninjatrader-support2.com/vb/showthread.php?t=9825
o Help for Debug
Below is the output from indicator SampleTryCatch above with Debug Mode disabled:
1/9/2009 12:11:00 AM System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at NinjaTrader.Indicator.DataSeriesHelper.get_Item(In t32 barsAgo)
at NinjaTrader.Indicator.SampleTryCatch.OnBarUpdate()
After compiling with Debug Mode enabled the output shows the cs file and line number where the exception occurred:
1/9/2009 12:11:00 AM System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at NinjaTrader.Indicator.DataSeriesHelper.get_Item(In t32 barsAgo)
at NinjaTrader.Indicator.SampleTryCatch.OnBarUpdate() in c:\Documents and Settings\JW\My Documents\NinjaTrader 6.5\bin\Custom\Indicator\SampleTryCatch.cs:line 57
I suggest that this benefit of testing with Debug Mode enabled be added to NinjaTrader documentation.
Comment