Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Indicator seems to be a Resource Hog

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

    Simple Indicator seems to be a Resource Hog

    Hello, can someone look at this simple indicator and tell me why it is such a resource hog? And how to improve it? Are 6 plots too many? It is using almost as many resources as the Volume Profile.
    Attached Files

    #2
    It seems probable you're applying this to too small/fast of a time frame or on too many symbols and charts at a time. Is it running as a column in Market Analyzer? Or, is it on 20 charts all of which are small bars?

    Or, after adding it to the chart, are you changing it from its default OnBarClose to OnEachTick or OnPriceChange?
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Actually, this is on only one 30 minute MES chart, and not on Market Analyzer. I should have mentioned that.
      Last edited by JohnS52; 12-03-2023, 07:33 AM.

      Comment


        #4
        Just out of curiosity, how many days have you been running NT? I use 2-3 NQ range charts and I have almost never seen any indicator have more than 1 million ms of CPU time.

        Comment


          #5
          Hello JohnS52,

          Thanks for your post.

          I do not see anything specific in the code you shared that would cause the indicator to use a large number of resources.

          Do you have Tick Replay enabled?

          As Leeroy_Jenkins stated, how many days have you been running NinjaTrader?

          For best performance, we suggest resetting NinjaTrader daily as noted in the help guide page below.

          Performance Tips: https://ninjatrader.com/support/help...ance_tips2.htm

          As a test, please restart NinjaTrader, then close any workspaces you have open, create a New > Chart window in the blank workspace, add the indicator to the chart, open the NinjaScript Utilization Monitor, and note the number of resources being used.

          Do you see the same behavior occur after running this test?

          Further, you could find performance tips from our help guide linked above. These tips will help optimize the performance of your platform.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment


            #6
            Thanks for your interest and your replies. That was about 24 hours of NT data. No Tick Replay enabled. It's doing it again today. Already 400,000+ms in about 2 hours, running On Price Change on two 30 minute charts. I usually do restarts of NT8 and my computer everyday. I will try and delete the cache and see if that helps.
            Last edited by JohnS52; 12-04-2023, 09:10 AM.

            Comment


              #7
              Do you call this indicator within other indicators/strategies? It seems like it recalculates for all bars on each price change. It happened to me once with my own indicator.

              Comment


                #8
                Hello Leeroy, I will have to look into that with a Print function. That could possibly be what's happening. But why would it do that?


                But no, I am not using it in any strategies, just the two 30 minute charts. I originally made it because the Lizard amaMacdBB indicator seemed to not work properly with the Markers Plus system: I was trying to simplify it.

                Comment


                  #9
                  Hello JohnS52,

                  Thanks for your notes.

                  When working with any issue, it is important to take steps to isolate the issue so that the exact line causing the behavior can be found.

                  This is a process of elimination and a process of debugging by adding prints.​

                  To see what section of code in the script is causing a large number of resources to be used you could reduce the code of the script and debug by adding prints.

                  Comment out one section of code at a time and test the script in a blank workspace on a single blank chart with no other indicators, strategies, or custom bar types applied to the chart. If at some point you comment out a section of code and see the behavior stopped, you could debug the script further by adding prints and uncommenting lines of code from the commented out section of code to narrow in on the offending code.
                  <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                  Comment


                    #10
                    Update for anyone interested: I was running NT8 on a Dell XPS8930 with a 6 core/12 thread CPU and a GTX1060 running 4 monitors. This computer often had huge lag problems, especially when the market was moving quickly. I would place a trade and the screens would immediately lock up. I assumed it was an NT8 problem, or perhaps the computer wasn't powerful enough. Finally I discovered that the Power Supply wasn't powerful enough. Dell included a 450 watt power supply, knowing full well that the GTX1060 requires a 550 watt power supply. I installed a Corsair 750 watt power supply and all the lag problems went away.

                    Now I have an XP8960 with a much more powerful CPU and the same problem: an under-sized power supply. I am waiting for Dell to ship me the new power supply since they changed the dimensions and it is no longer the ATX standard size.

                    NT8 Market Analyzer Lag Indicator: https://support.leelootrading.com/kb...asure-lag.aspx

                    Chart Lag Time - highly recommend this indicator be added to your trading chart - see attached
                    Attached Files
                    Last edited by JohnS52; 03-09-2025, 09:31 AM.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    566 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    330 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    547 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    548 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X