Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not executing

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

    Strategy not executing

    Hello,

    NinjaTrader is not executing my strategy. My code was being executed just fine, and at first when the buy/sell signals didn't refresh I thought I had added a bug to my code on the last modification. However, in trying to discover the issue, I put a Print in both the Initialize() and OnbarUpdate() functions and am seeing no output to the Output Window.

    I thought maybe there was a bug with the way I named a variable, "EXIT_THRESHOLD", so I renamed all instances of this text to "innocent" and still see no output.


    What could be causing this?

    Thanks,

    egonline

    #2
    Solution

    I found the problem - I was accessing the "TickSize" variable in Initialize(). This ostensibly causes the strategy to cease it's execution.

    For future reference, is there some kind of debugging console in which developers could see when the strategy script is killed by NinjaTrader?

    Thanks,

    egonline

    Comment


      #3
      Any runtime exceptions in a strategy wil always terminate the strategy and be reported in the Control Center window Log tab along with any exception message.
      RayNinjaTrader Customer Service

      Comment


        #4
        I've had a number of times where I was puzzled for a while just because I didn't notice that this error message information was available.

        I would think that it would help decrease your support traffic if whenever an exception message was output to this Log tab, that something would force this Log tab to be displayed (and perhaps flash the task bar entry for the control center.)

        Rub my nose in it... honest, I won't mind... it'll just save all of us some time.

        Obviously you wouldn't do this for purely informational messages, but it should be done for any messages of a severe nature, which indicate an error has occurred which has caused NinjaTrader to terminate an indicator or strategy.

        Comment


          #5
          Thanks for the suggestion. We will put it on the list for future considerations.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          656 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          577 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X