Automatically clear Debug window?
Author: ciconia1
Creation Date: 12/26/2016 7:50 AM
profile picture

ciconia1

#1
Is there any way to automatically clear the 'Debug and Error Messages' window when my alert screener runs?
profile picture

Eugene

#2
Of course no. It's there exactly to warn you about an error, so what'd be the point in this strange behavior?

P.S. You could use ClearDebug() to clear any debug output from your script.
profile picture

ciconia1

#3
When I run the screener, the results are visible in the 'Debug and Error Messages' window (ctrl-alt-D). What I'd like to do is clear the previous messages before more are added. I didn't know about the ClearDebug command. I think it might be exacly what I want except that I can't get it to work. If the command is uncommented then the message window is always clear.
profile picture

Eugene

#4
ClearDebug() clears your script's entire output from previous run. So if you run your strategy in MSB mode, only the last symbol's output will be shown. You can recycle the Debug window by reopening it prior to running a strategy.
profile picture

ciconia1

#5
Thanks for your guidance. I'll close and reopen the window with every strategy.