Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NoPrint Property

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    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.

    Comment


      #3
      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.

      Comment


        #4
        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;
        }

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        591 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        553 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X