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

Splitting Indicator Files

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

    Splitting Indicator Files

    Hello Support,

    While editing (large code base) in-line compiler at times trigger exception "system runs out of memory", as it requested more memory. This could be triggerred with just typing Open Curly Bracket for instance. Normally first time it occurs, NT would be able to recover and I continue editing, but the second time it happens usually results in crash. ( I am still on XP with max 4GB memory)

    How can I split my files into two, first just contain all working codes, so the working codes need not be edited, the second file is the new code or functions that I need to modify?

    Thanks.
    Best Regards,
    Edward K.

    #2
    Hello Edward,

    Just a note by default, all 32 bit applications are limited to 1.2 GB of memory by the .NET framework. Because of this, even those systems which have more system memory than 1.2 GB can use only this amount of memory

    While it is possible to have multiple files when coding this is something that NinjaTrader would not support. You can put some common items in the User Defined Methods file to access to frequently used functions. See the following link for more information about User Defined Methods.
    http://www.ninjatrader.com/support/h...ed_methods.htm

    With that said how big is your file? It should not be so big as to cause to crash. Please note as well that when compiling NinjaTrader will compile every Indicator/Strategy not just the one you are working on.

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Reducing memory use

      Hello JC,

      Thank you for the response. Seems a good idea to can some functions as separate indicator, even with no plots. The reason it could crash is this SIM system is connected with multiple opened workspaces, as I am collecting data for strategy testing later.

      I am wondering, I have two ideas for alternative solutions:
      1. I have another computer LIVE license with the same data, can I just copy the .ntm files from relevant missing date directories over? Is there anything else I should do? I saw there is tick, minutes and day directory. What is the proper way to copy over data to another computer for specific dates interval? This way I need not open the workspaces for data collection.

      2. How can I collect data with the smallest memory requirement, if I just have the DOM for the instrument I am interested in, without the chart, would NT still collect the data? and presumably use a lot less memory?

      Thanks
      Best Regards,
      Edward K.

      Comment


        #4
        Hello Edward Kunafi,

        1. The easiest way to transfer settings/data to a second computer is using the Backup Utility within NinjaTrader.

        You can access this Utility from the Control Center -> File -> Utilities -> Backup. The dialog window that appears has checkboxes for what you would like to backup and a location default to <My Documents>\Ninja Trader Backup\
        The following link is to our Help Guide on Backups.
        http://www.ninjatrader.com/support/h...up_archive.htm

        After you have moved the Backup file to the second computer, use the Restore Utility, Control Center -> File -> Utilities -> Restore, and use the pop up file browser to select the Backup.
        http://www.ninjatrader.com/support/h...up_archive.htm

        Here is a link to a video demonstrating this that you may view.
        http://www.youtube.com/watch?v=zGCp9...ure=plpp_video


        2. Could you clarify what data that you would like to collect? (Example: Saving data as historical, Record for market replay, etc...)

        Happy to be of further assistance.
        JCNinjaTrader Customer Service

        Comment


          #5
          Hello JC,

          I know there is back up. When I do backup there is no selection which period to back up? Is the back up incremental (the first ever time I did, it take hours upon hours, so I cancel it). I just saw the video, but still wonder what would happen if the target PC already have same data? If the next week I did another back up? would it take hours upon hours again, or is it backing up just the last week? From what I see, it will do whole back up again.

          My SIM computer is collecting data for market replay for strategy testing, which require every ticks. What is the simplest way with least memory usage? (Open chart with no indicator, open DOM, Open Level 2 windows)?

          Answer to your previous posts, my Indicator file is about 0.5MB.

          Thanks.

          Regards.
          EdwardK.

          Comment


            #6
            Hello Edward Kunafi,

            The Backup utility will backup everything you have selected regardless of when it was created/saved. Also, the Backup utility will do a full backup every time, and if the target PC has the same data as the backup then it will be overwritten. Please note that you depending on how much data you have in the respected folder like the Historical chart data, Log and trace files, and Market Replay data it can take a while to backup. You can manually copy over Market Replay data by coping data from the (My) Documents -> NinjaTrader 7 -> db -> data. There you will see folder(s) that will be listed by the date (yyyymmdd - 20120709) and inside those folders will be the Market Replay data listed by Instrument Name.

            All of the windows are not very memory intensive, but if you are just recording the SuperDOM will work.

            That is a very large file. So that I can test this behavior on my side could you send the indicator in a email. Using this website to attach the files: https://www.wetransfer.com/

            After you left clicking on the link:

            * Left click on the "Go" button
            * Left click on the "+ Add files" icon in the top box
            * Navigate to "(MY) Documents -> NinjaTrader 7 -> bin -> Custom -> Indicator left click on the indicator name and press the "Open" button
            * In the "Enter friend's e-mail" put "support[At]ninjatrader[dot]com"
            * Enter your e-mail address in the provided spot
            * In the "Type your message" box please put "ATTN: JC -" and reference this post.
            * Press the "Transfer" button


            Here is a link to our support forums that goes over how to debug your code which comes in handy when writing custom code to debug it.
            http://www.ninjatrader.com/support/f...ead.php?t=3418

            Please let me know if I can be of further assistance.
            JCNinjaTrader Customer Service

            Comment


              #7
              Hello JC,

              Noted. Many thanks for all the pointers and references.
              I have enough to try on and continue.
              Regret to say I am not able to send over my indicator.

              My hopefully last questions, does .Net Framework limits memory usage of 64bit apps?
              If I run NT7 on Windows7 on machine with 16GB memory, how much memory can it use?

              Thanks.

              Best Regards,

              Edward K.

              Comment


                #8
                Hello Edward Kunafi,

                Yes, a 64bit program using .NET framework will be limited to about 2.8gb of RAM. You may view the following link that will go over more about .NET memory limits.
                http://blogs.msdn.com/b/tom/archive/...processes.aspx

                Please let me know if I can be of further assistance.
                JCNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Max238, Today, 01:28 AM
                5 responses
                42 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by giulyko00, Yesterday, 12:03 PM
                3 responses
                12 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by habeebft, Today, 07:27 AM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_ChristopherS  
                Started by AveryFlynn, Today, 04:57 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by r68cervera, Today, 05:29 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X