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

Alternative graphics to conserve CPU

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

    #16
    Originally posted by sledge View Post
    I missed that too in the original post. Yes, that is in NT8 from NT_JP.

    Everyone complaining/having issues with NT8 graphics, we simply assumed it.
    I would hope my CPU issues go away with NT8 and its multi core usage.
    But there I have to wait to be able to use the Crosshair cursor.

    Comment


      #17
      My mistake, JerryWar, I will run some tests with NinjaTrader 7. Please do note that NinjaTrader 7 is reaching the end of its active development cycle, and it may be that we will need to find a work-around such as the ones you suggested. Since we do support the graphics library you mentioned in your original post in NinjaTrader 7, I will be able to benchmark that as well and return with more information.
      Jessica P.NinjaTrader Customer Service

      Comment


        #18
        Hello again JerryWar,

        The test code I attached to this e-mail took considerably longer and had a considerably higher memory usage than the NT8 test code.

        However, I was able to create a test for Graphics.FillRectangle using code samples I found elsewhere on the forums. The links to these code samples are in comments in the code I am providing. I discovered that Graphics.FillRectangle offers no appreciable speed increase, and has a memory increase on my system comparable to one of the calls to DrawRectangle.

        Therefore, I can recommend using DrawRectangle in your own NT7 projects.

        To your second question, while you may use windows form methods, this behavior is undocumented. You may use the source I am providing, and the other forums posts linked to in source, as a starting point. However it is my opinion after testing that you will end up with performance comparable to documented NinjaScript methods.

        Please let us know if there are any other ways we can help.
        Attached Files
        Last edited by NinjaTrader_JessicaP; 10-12-2016, 10:30 AM.
        Jessica P.NinjaTrader Customer Service

        Comment


          #19
          Jessica,
          When you say considerably longer, could you give me some kind of percentage increase or multiple since I assume you ran these on the same machine, It would give me an idea of what to expect in converting to NT8.

          Jerry

          Comment


            #20
            In NinjaTrader 8, there was no appreciable increase in chart load times for me. In NT7, on my machine, it took over 10 seconds to load a chart, over 12 seconds when I ran all 5 tests. This was before adding the check for "if (Historical)" . With that check, Ninja draws new rectangles nearly instantly in NT7; it's drawing rectangles over historical data that caused Ninja's delay.
            Jessica P.NinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_JessicaP View Post
              In NinjaTrader 8, there was no appreciable increase in chart load times for me. In NT7, on my machine, it took over 10 seconds to load a chart, over 12 seconds when I ran all 5 tests. This was before adding the check for "if (Historical)" . With that check, Ninja draws new rectangles nearly instantly in NT7; it's drawing rectangles over historical data that caused Ninja's delay.

              Yes I understand that the historical rectangles create a delay. But by loading and drawing with a fixed length data series using the historical you can get a relative idea ( multiplied )
              as to how it will respond in Real Time. There were some instructions in the NT8 version I was unfamiliar with, Can I assume you were comparing NT8 drawing on historical with NT7 drawing on Historical initially ?

              Thanks so much
              Jerry

              Comment


                #22
                Originally posted by JerryWar View Post
                Can I assume you were comparing NT8 drawing on historical with NT7 drawing on Historical initially ?
                I was in fact, it was my intent to "torture test" with a large data set so I would have as accurate an idea how long each operation was taking as I could get.
                Jessica P.NinjaTrader Customer Service

                Comment


                  #23
                  It sounds like you have made a compelling case for NT8.
                  Thanks
                  Jerry

                  P.S. - I shut off Hyper Threading and the indicator is loading 2 seconds faster which is about
                  25%
                  Last edited by JerryWar; 10-12-2016, 05:33 PM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by TraderG23, 12-08-2023, 07:56 AM
                  9 responses
                  382 views
                  1 like
                  Last Post Gavini
                  by Gavini
                   
                  Started by oviejo, Today, 12:28 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post oviejo
                  by oviejo
                   
                  Started by pechtri, 06-22-2023, 02:31 AM
                  10 responses
                  125 views
                  0 likes
                  Last Post Leeroy_Jenkins  
                  Started by judysamnt7, 03-13-2023, 09:11 AM
                  4 responses
                  59 views
                  0 likes
                  Last Post DynamicTest  
                  Started by ScottWalsh, Yesterday, 06:52 PM
                  4 responses
                  36 views
                  0 likes
                  Last Post ScottWalsh  
                  Working...
                  X