Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strait Errors during trading

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

    Strait Errors during trading

    I will get this out of no where and it just freezes the trading until i restart it or reboot NT8 Average Price=0 Quantity=0 Market Position=Flat operation=Remove
    Also onbar update errors like this

    #2
    Hello Chryslertech,

    Thank you for your inquiry.

    In order to identify the cause of this error and see how the code is working, I suggest adding Print() statements throughout OnBarUpdate().

    If you add a Print() every few lines, then you can review the NinjaScript Output window. Once the error appears, the last print to show in the output will help you to narrow down the line of code that caused the error in your strategy script.

    For more info about using prints to debug your script:

    https://forum.ninjatrader.com/forum/...121#post7911211

    Please let me know if I can assist further.

    Comment


      #3
      Can this only be done by adding code in certain places? can this be done using Strait builder ?

      Comment


        #4
        Hello,

        If you mean the Strategy Builder, yes prints can be added in the Builder. You can add the prints to the 'Actions' section of your sets.

        Below is a link to a video on 'Debugging using prints with the Strategy Builder'.

        NT8 Strategy Builder - https://drive.google.com/file/d/1CCl...gEIwJKv6L/view

        Please let me know if I can assist further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        163 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        82 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        125 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        206 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        185 views
        0 likes
        Last Post CarlTrading  
        Working...
        X