Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delete DB and Create Sim accounts programmatically

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

    Delete DB and Create Sim accounts programmatically

    Hello,

    Is there a way to do this automatically. It's pretty tedious to do it manually. If you have made many trades resetting the account is not an option as it takes forever so it's best to just delete de DB and create new Sim accounts. So is there a way one could make this process automatically for instance:

    // OnBarUpdate()
    if (CurrentBars[0] == 0)
    {
    // delete DB;
    // Create Sim2,3,4...
    }

    #2
    Hello roblogic,

    There is not a way to interact with the database or do resets from scripting. You would need to manually reset the account/create the account if you need to modify it.

    Please let me know if I may be of additional assistance.

    Comment


      #3
      Try AutoHotkey.

      Comment


        #4
        Thanks. May I request a future update including this feature, or at least a much faster way to reset SIM accounts?

        Comment


          #5
          Hello roblogic,

          I put in a feature request for this item.

          Please let me know if I may be of further assistance.

          Comment


            #6
            A relatively straightforward way to quickly reset the db:
            1. Shutdown NT
            2. Rename/delete the current db file
            3. Restart NT -- this will automatically create a new db file
            4. Update the [now new] db with whatever changes you want so it is how you want it when "reset" -- this becomes your "reset to template" db
            5. Copy the updated db file to wherever you wish [preferably not in the NT folder as a remove/reinstall of NT may lose it]
            6. When required, with NT not running, rename/delete the old db file
            7. Copy the saved "template" file to be the current db
            8. Restart NT -- the copied template file is now the current db and everything will be as you set it in that file
            Hope that helps.

            Thanks.
            Multi-Dimensional Managed Trading
            jeronymite
            NinjaTrader Ecosystem Vendor - Mizpah Software

            Comment


              #7
              Originally posted by jeronymite View Post
              A relatively straightforward way to quickly reset the db:
              1. Shutdown NT
              2. Rename/delete the current db file
              3. Restart NT -- this will automatically create a new db file
              4. Update the [now new] db with whatever changes you want so it is how you want it when "reset" -- this becomes your "reset to template" db
              5. Copy the updated db file to wherever you wish [preferably not in the NT folder as a remove/reinstall of NT may lose it]
              6. When required, with NT not running, rename/delete the old db file
              7. Copy the saved "template" file to be the current db
              8. Restart NT -- the copied template file is now the current db and everything will be as you set it in that file
              Hope that helps.

              Thanks.
              Thanks. This is the workaround I do. I just delete de DB. Then I have to recreate all SIM accounts manually which is a bit of a pain though...

              Comment

              Latest Posts

              Collapse

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