Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where are strategies stored?

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

    Where are strategies stored?

    It seems to me that the strategies are not stored in the workspace XML, can anyone tell me what XML the strategies are actually stored in?

    Its incredibly frustrating when a workspace crashes and I lose all my strategies and then have to rebuild them

    #2
    Hello ErikY,

    The instances (not the code) of strategies are stored in both the database and the workspace. The information about the strategy is saved in the database, and the ID for the instance is stored in the workspace. When the workspace opens, it fetches information to re-initialize the instance from the database based on that ID.

    As long as the workspace is saved and the workspace and database are not removed or reset, and the implementation of the strategy code has not changed, I would expect all instances to restore when the workspace is open.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello ErikY,

      The instances (not the code) of strategies are stored in both the database and the workspace. The information about the strategy is saved in the database, and the ID for the instance is stored in the workspace. When the workspace opens, it fetches information to re-initialize the instance from the database based on that ID.

      As long as the workspace is saved and the workspace and database are not removed or reset, and the implementation of the strategy code has not changed, I would expect all instances to restore when the workspace is open.
      ok, so whats happening is Ninja is hanging for some reason, and my workspace crashes, ninja has to be hard exited, and then I lose all 70 of my strategies and have to rebuild them. So it sounds like with what you described, there is no way to get them back without rebuilding them? The workspace itself I cna make a copy of, but no way to do with with strategies? If so, thst really unfortunate

      Comment


        #4
        Hello ErikY,

        If NinjaTrader closes without saving the workspace, then the strategies and other windows will not be saved in the workspace or restored.

        After rebuilding the workspace immediately manually save it before enabling any strategies.

        Then if NinjaTrader freezes and you have to close it, the workspace is already saved and will restore the way it was last saved and you won't have to rebuild it.


        The hang would likely be caused by a running script or amount of running scripts.
        If a specific script is causing the hang, I would recommend investigating what code in that script is causing that behavior.

        If the amount of scripts is causing the hang, I would recommend reducing the amount of running scripts.

        This thread discusses performance.
        Hello All, I am using NT8 8.0.17.2. My workspace has been essentially static for more then six months, meaning no new indicators or growth in windows open or

        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          So, I saved after enabling them, and that did not seem to work, you specifically have to save the workspace before enabling them? Why is that?

          Comment


            #6
            Hello ErikY,

            The scripts being enabled is going to take up resource performance and could cause the hang before you can save the workspace..
            I'm suggesting you save the workspace before NinjaTrader hangs.

            I am not able to reproduce. Below is a link to a video.
            https://drive.google.com/file/d/18Ot...w?usp=drivesdk


            Your strategy might also not be written correctly to save in a workspace. Do you see errors on the Log tab of the Control Center when saving the workspace?
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            46 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            126 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            66 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X