Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programmatically importing strategies into charts

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

    Programmatically importing strategies into charts

    Hey guys,

    I hope you are well.

    I am wondering if any of you "power" users have found a way to programmatically import /add strategies into charts with specific parameters?

    For example:
    step 1 - add strat1 to chart 1 with parameter x y z
    ​step 2 - add strat1 to chart 1 with parameter a b c
    etc etc

    The idea is that i am testing a ton of strats in market replay (i need live data) with different parameters, and rather than clicking the mouse a thousand times i thought some of you may have a clever way / or ideas on how to do this in a more automated manner (scripts? predesigned html files)?

    Bonus question: by the same token, i find it extremely hard to find a way to export an image of my NT8 from a pc to another (office pc vs home pc for example) in an easy way to run tests on the same strats / workspaces.

    I am trying the "export backup" file but it seems to go constantly into error when importing.

    Thanks in advance

    #2
    Originally posted by gabmit1 View Post
    Hey guys,

    I hope you are well.

    I am wondering if any of you "power" users have found a way to programmatically import /add strategies into charts with specific parameters?

    For example:
    step 1 - add strat1 to chart 1 with parameter x y z
    ​step 2 - add strat1 to chart 1 with parameter a b c
    etc etc

    The idea is that i am testing a ton of strats in market replay (i need live data) with different parameters, and rather than clicking the mouse a thousand times i thought some of you may have a clever way / or ideas on how to do this in a more automated manner (scripts? predesigned html files)?

    Bonus question: by the same token, i find it extremely hard to find a way to export an image of my NT8 from a pc to another (office pc vs home pc for example) in an easy way to run tests on the same strats / workspaces.

    I am trying the "export backup" file but it seems to go constantly into error when importing.

    Thanks in advance
    Have you tried editing the workspace xml file? May also need to edit the NinjaTrader.sqlite file, not sure

    Comment


      #3
      Hello gabmit1​,

      Thank you for reaching out.

      I would not have much to offer in regards to programmatically importing/adding strategies into charts with specific parameters.

      You could reach out to our engineering team to see if they have insight on the best way to do this/if possible:

      Their contact is:

      [email protected]


      Regarding your backup issue:

      I believe the back up method would be the best way to get your same setup on another PC. However, if you are getting errors when importing, most likely the database that was included in the back up was no longer in a viable state.

      What you can do, is manually extract the files from your back up, to copy/paste in your NinjaTrader 8 folder.

      If it is a back up file created by NinjaTrader (Tools -> Export -> Backup), you can use these steps:
      • Right-click and make a copy of the backup file.
      • Select the file ->Right click the file -> Rename
      • Change the name of the file from .nt8bk to .zip > Click OK to change the format.
        • (If you can't see the .nt8bk, at the top of the window, expand "View" > On the right, check the box next to "Show extension". Then you can make the changes)
      • Right-click and extract the files
      You now have access to the files saved in that backup.

      You can now manually copy whatever old files you want over to your new NinjaTrader 8 folder.

      Please let us know if we may be of further assistance.​
      Erick P.NinjaTrader Customer Service

      Comment


        #4
        Hi Eric,

        Thank you for your response.

        Unfortunately that does not work. It loads all the charts ect but the strategies are not loaded into the charts themselves, which is exactly the point that i am struggling with.

        Anything else i can try? this is also important as it wouldn't be the first time that NT8 crashes and restarts without my strats loaded. That means when that happens i need to manually reload the whole thing... just painful.

        Question, what is the file that contains the actual info about "these strategies are loaded on these charts" ?

        anything else you can suggest may help.

        Ps. i'd suggest to fix the "import" export function, hasn't worked once for me . surely the expected behavior would be to not export a file that eventually cannot be imported properly ?

        thanks in advance

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        68 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        24 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        27 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X