Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    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.

        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        17 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Working...
        X