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

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 knowmad, Yesterday, 03:52 AM
          5 responses
          45 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by ETFVoyageur, Yesterday, 07:05 PM
          3 responses
          23 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by geotrades1, Today, 07:54 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by prisonbreaker82, 02-24-2024, 11:16 AM
          2 responses
          35 views
          0 likes
          Last Post proptradingshop  
          Started by MGHORBEL, Today, 06:25 AM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X