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 Analyzer Unstable

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

    Strategy Analyzer Unstable

    Intermittently, the Strategy Analyzer will crash the entire platform.

    This is extremely frustrating as nothing changes between strategy runs.
    I'll test my strategy once it works fine. I run it again immediately after and it crashes the entire application.

    How can I determine what is causing this issue?
    I'm running 8.0.7.0 64-bit (Multi-Broker), using the "unmanaged" approach.


    (As a side note, an application should NEVER be released to the public with unhandled exceptions causing the entire platform to crash!)

    #2
    Hello Mark,

    Thank you for your note.

    Are you able to reproduce this behavior using the SampleMACrossOver script included with NinjaTrader?

    If you open the Windows TaskManager are you finding that the memory amount for the NinjaTrader process is increasing by a large amount when running the backtest?

    Below is a link to an example script named . Are you able to reproduce using this example?

    Part of the power and flexibility of NinjaTrader is allowing users and 3rd party developers to create scripts in C# that run on the NinjaTrader Platform. However, NinjaTrader is not able to prevent code that will improperly execute from being written into a script. Because of this, it is possible for an improperly coded NinjaScript to cause undesired behavior. However, the help guide provides documentation for developers to avoid a large amount of code that can cause issues. Even with these guidelines, it is still possible for the logic of a script to cause undesired behavior.

    From the help guide:
    NinjaTrader 8 provides a development environment allowing low-level access to 3rd party developers to build integrated indicators, drawing tools, automated strategies and more. An Add-On with software bugs can have adverse effects on the entire NinjaTrader application. These add-ons also natively run on your computer, therefore, its important to only install 3rd Party Add-Ons from sources you trust.
    The following symptoms post installation could indicate an Add-On is installed causing negative impact:
    • Windows become slow or unresponsive to user interaction
    • Market data becomes unusually slow to load or update
    • Standard features fail to work as designed
    • Lost connections from market data providers
    • Error messages are generated at various times
    • The entire application shuts down abruptly and without warning"
    • http://ninjatrader.com/support/helpG...tallingAdd-Ons


    An analogy for a platform would be Microsoft Windows. Like NinjaTrader, Microsoft creates the Windows platform that allows other developers to write and execute their own programs within. However, it is not possible for Microsoft to prevent developers from writing applications with improperly written or designed code. It is possible for a developer to write a program that can cause adverse behavior within the program, but also affect the entire Windows operating system and cause performance issues or even crash the entire operating system platform.

    In the same way, while we strive for excellence within our own platform and work to continuously improve our product, it is not possible for NinjaTrader to allow for the power and flexibility of NinjaScripts and also prevent scripts from having the ability to cause undesired behavior with performance or crashing.


    That said, if we can demonstrate that there is an issue directly with the NinjaTrader Platform by creating sample scripts that only contain the bare-bones minimum code to reproduce the behavior, we are able to report these issues to our development for correction.

    I look forward to your reply.

    Comment


      #3
      Thanks for the quick reply Patrick! I'll start doing some additional research and let you know what I discover.

      The strategy I'm creating is somewhat complex so I will have to wrench on it a bit to see if I can narrow things down. It has the following features, any of which could be the culprit either due to an error on my end or a previously undiscovered bug within the platform.

      - Unmanaged orders
      - Ability to read indicator output from another timeframe (i.e. a call to AddDataSeries())
      - Visual drawing elements (Dots, triangles, etc. to provide visual cues)
      - Trade management which will cancel/move orders as needed.

      I understand what you mean about not being able to handle user-driven errors being that they can code whatever they want. I've been a professional software developer for 20+ years and we have a saying: "Writing software would be great if it weren't for the customers."

      I'll keep you posted.

      Comment


        #4
        -- UPDATE --

        So, after quite a bit of troubleshooting and trial & error, I think I figured out what is happening here.

        We do all of our development in Visual Studio. And for some reason, it seems that the compiled binaries between NT and VS become out of sync after lots of changes have occurred. It's almost as if there is a lag between the NT compiler and what Visual Studio creates.

        However, what has been working for us is to simply shut down/exit NinjaTrader, and then clean the entire solution. Do a rebuild of everything, and then re-launch NinjaTrader. Things seem to work fine after that.

        Hopefully this may help someone with a similar issue.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        53 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Started by Kaledus, Today, 01:29 PM
        0 responses
        4 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by yertle, Yesterday, 08:38 AM
        8 responses
        37 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by rdtdale, Today, 01:02 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Working...
        X