NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Suggestions and Feedback > Suggestions And Feedback

Suggestions And Feedback New feature suggestions and feedback.

Reply
 
Thread Tools Display Modes
Old 09-29-2009, 07:35 PM   #1
jerimac2
Junior Member
 
Join Date: Jul 2009
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
Default NoPrint Property

Having a single Output window can be confusing, when diagnosing or tracking multiple strategies simultaneously. Going through a strategy to comment out all the Print statements, recompiling, and rerunning the strategy takes time and can lead to errors.

It would be helpful to have a NoPrint = true property that could be set in the Initialize() handler, or even in the Strategy setup dialog to suppress all Print statements in that strategy. One could quickly choose whether a strategy prints on a given run, in the same way that one sets TraceOrders or ExitOnClose.

j2
jerimac2 is offline  
Reply With Quote
Old 09-29-2009, 07:52 PM   #2
Anagoge
Senior Member
 
Join Date: Sep 2008
Posts: 183
Thanks: 0
Thanked 1 time in 1 post
Default

What I do: Define a DebugPrint method in your strategy/indicator, call DebugPrint instead of Print, and selectively call Print or nothing in DebugPrint there based on a boolean Debug property/parameter in your strategy/indicator.
Anagoge is offline  
Reply With Quote
Old 09-30-2009, 09:13 AM   #3
jerimac2
Junior Member
 
Join Date: Jul 2009
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks, Anagoge. That works like a champ, and it's every bit as easy to manage as the feature I was requesting. Now I don't have to wait for NT 8.5.
jerimac2 is offline  
Reply With Quote
Old 02-27-2013, 10:31 AM   #4
bottrader
Junior Member
 
Join Date: Sep 2012
Posts: 8
Thanks: 1
Thanked 0 times in 0 posts
Default

Hi Anagoge ,

Yes this is a good workaround solution .
How you pass the debugText string to be printed to the DebugPrint() method (function) ?

private void DebugPrint()
{
if (Debug == true)
{
Print(Time+DebugText);
}
else return;
}
bottrader is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete a property blarouche Indicator Development 4 08-14-2009 12:37 PM
Historical property tamas Strategy Analyzer 2 06-28-2009 11:46 PM
Query regarding Historical property ScoobyStoo General Programming 14 05-22-2009 09:39 AM
rectangle Opacity Property mikeytrader General Programming 1 05-09-2009 02:08 PM
Added Property to Strategy but Not Showing on Property Grid stocastix Automated Trading 2 11-07-2008 04:00 PM


All times are GMT -6. The time now is 05:40 PM.