Simply add to the module file:
using System.Runtime.CompilerServices;
Then any function definition can have optional parameters added such as this:
public void debug (String message,[CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) { NinjaTrader.Code.Output.Process("From "+memberName+["+sourceFilePath+"] (@"+sourceLineNumber+") MESSAGE: "+ message ,PrintTo.OutputTab1); }
My feeling is this should be a global "Enable/Disable" in the control panel settings. It should enable/disable this additional data to be printed. This would also be helpful in "error messages" to pinpoint the offending line.
Please let me know if you need help/ideas of how to implement this feature into the core of NT8.
Comment