Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange Output Window clearing when enabling strategy

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

    Strange Output Window clearing when enabling strategy

    I have a few strategies that I created to test alerts. The first few I have are working great. The one I just created is exhibiting strange behavior and wondering if anyone can help. Essentially the strategy is triggering trades later than it should. So I am assuming I have a logic issue in my code somewhere. In an attempt to try to figure out the logic issue, I am printing values of indicators used to trigger a trade, to the output window and showing time and details.

    I have done the exact same thing in the other strategies that are now working properly. The most recent strategy I created was a code copy from other working strategies, with minor tweaks to the trade execution logic, but very minor.

    This newest strategy, when I enable it, I see it printing to the output window, and than right before it enables the real time strategy, it clears the entire output window and I can not see the prints.

    The other strategies with largely the exact same code print to the output window, enable, and the prints are still there and not being wiped out.

    Can anyone point me in any direction on this? I know there is some output window size limit, so I even tried drastically reducing my data series to only output minimal data, and its still happening, so something is executing a clearoutputwindow() but I do not have that in my code.

    #2
    Hello ErikY,

    From the details I would not be able to tell what is causing the problem however you are correct that something is executing clearoutputwindow. One possible way to identify this would be to search for ClearOutputWindow in the windows explore on the folder Documents\NinjaTrader 8\bin\Custom. Depending on what scripts have that it could provide some clues on what's happening with the strategy.

    The output window should just notify you if you exceed the limit, it puts a message about the output being truncated. The clearing of the output once reaching realtime may be a result of having ClearOutputWindow somewhere in OnBarUpdate or OnStateChange.

    Comment


      #3
      One other thing I just noticed, once its enabled, every time a bar completes, it is printing to the output, so something specifically is clearing it when the strategy is being real time enabled, and not on the bar update or anything like that. Does that give me any clues? I am not finding anything in the search for clear output window.

      Comment


        #4
        Hello ErikY,

        That does not give any addition clues on what the problem may be. I would suggest to make a new empty strategy that has a print in OnBarUpdate and see if that still clears. If so you would need to look at what else is open in the platform, try closing all workspaces and see where the problem is stemming from.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        65 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X