Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Strategy analyzer is a lot slower than nt7

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

    NT8 Strategy analyzer is a lot slower than nt7

    I am developing strategies in Ninjatrader on a daily basis. I have happily been using NT7 for years and have now migrated to NT8, and it is so slow...

    • When I start a Strategy analyzer and select my strategy it takes 15-20 sec.
    • Change template takes 15-20 sec.
    • Changing for minute to daily in the Strategy Analyzer takes 15-20 sec.

    This is not the case if I choose Sample MA crossover strategy, but my same strategy (with similar code) is at least 10 times faster in NT7.

    Note: My strategy has a lot of code in it, but not much in the States SetDefaults and Terminated which seems to be used when selecting for example a saved template.

    Why is this?

    Thanks!

    #2
    Hello Jackson12,

    Thank you for your post.

    There could be a number of reasons for this. I would start by checking the Log tab of the Control Center and the NinjaScript Output window for any details as to what is occurring.

    If you would like we can test out the strategy on our end to see if we can provide any specifics on the code being used. If you would like us to do so please attach your strategy to your response or send it over to platformsupport[at]ninjatrader[dot]com with this thread in reference.

    You can attach your strategy to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your strategy > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.

    Comment


      #3
      Hello,

      Thanks for replying. I have checked the log, which is empty. When checking the output log the following appeared:

      2016-11-04 14:12:32 CancelAllOrders: BarsInProgress=0
      2016-11-04 14:12:32 CancelAllOrders: BarsInProgress=0
      2016-11-04 14:12:53 CancelAllOrders: BarsInProgress=0

      In this example I first changed strategy to Sample MA crossover (which worked instantly) and then to my strategy (which took about 20 sec to load).

      Does this give any clues?

      I´d rather not send my code over.

      Thanks,
      Jakob

      Comment


        #4
        I checked the debugger while changing values and could see:
        1. State.Undefined #region Variables
        2. State.SetDefaults
        3. Long break(15 sec)
        4. State.Undefined #region Variables
        5. State.SetDefaults
        6. State.Terminated


        What happens during the long break (15 sec)?

        Thanks,
        Jakob

        Comment


          #5
          Hello Jackson12,

          Thank you for your response.

          What States are you using in your code? Are you checking an performing items in States outside of OnStateChange()?

          Can you provide your OnStateChange() code?

          Comment


            #6
            Hi

            I am using State.SetDefaults, State.DataLoaded, State.Configure and Sate.Terminated but it is not that the problem. I can measure that in the debugger.

            It is something that is done between. The problem seems to get worse if I have a larger backtest in another Analyzer..

            1. What does NT8 between the States?
            2. Does it update data in open Strategy Analyzers?
            3. Does it compile code when change the drop down list in the Strategy Analyzer?



            Thanks!

            Comment


              #7
              Hello Jackson12,

              Thank you for your response.

              On your questions:
              • There should be nothing occurring as far as the code between states.
              • Data would need to be downloaded when connected to your data provider.
              • No compiling of code is performed.


              My questions:
              • Are you checking and performing items in States outside of OnStateChange()?
              • Can you provide your OnStateChange() code?

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by timmbbo, Today, 08:59 AM
              1 response
              2 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by KennyK, 05-29-2017, 02:02 AM
              2 responses
              1,281 views
              0 likes
              Last Post marcus2300  
              Started by fernandobr, Today, 09:11 AM
              0 responses
              3 views
              0 likes
              Last Post fernandobr  
              Started by itrader46, Today, 09:04 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by bmartz, 03-12-2024, 06:12 AM
              5 responses
              33 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Working...
              X