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

Strategy with multiple DataSeries freezes all charts on the wotkspace

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

    Strategy with multiple DataSeries freezes all charts on the wotkspace

    Hello,
    In addition to the primary data series the strategy has 8 data series, 6 are based on the primary/master instrument and only 2 on another instrument. The strategy gets enabled and at any time will freeze the chart it's running on. The mouse pointer becomes a double arrow "<-->" when over the chart but is shown correctly for the rest of the charts (2). All of the charts show Ask & Bid, but they don't plot price action. NT8 shows a pop-up message: unHandled exception "write lock may not be acquired..."
    I tried repairing the DB but no change. Has anyone had this issue ?
    All that is being done with the data series is reading the values and updating an array of 12 elements. Also no writing is being done. I can understand a LOCK issue is present when trades haven't been placed. Three days of data on chart.
    The Control Center allows me to close the workspace but after that it freezes too and the only way to close NT is with the Windows Task Manager.

    Windows 10 64bit, NT8

    Thank you.
    Last edited by Anthony_0709; 05-11-2022, 04:50 PM.

    #2
    Hello Anthony_0709,

    The error message you have shown would indicate some problem with the code you are using that is causing a deadlock. have you tried to make a new empty script and only add the extra series with no additional logic? That type of test would help to identify what part of the original script is having a problem.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      I turned off the logic, compiled, closed NT, brought it back up, connected to the data feed, all charts get loaded and everything is fine, loaded & enabled the strategy, good........waited for a while, then:
      If I try to scroll the chart back and then to present, all charts stop plotting price action but keep showing data feeds. I can't even use the Control Center to close NT.

      (I had this running overnight and this morning I opened the Strategy Performance window and after that NT froze up).

      Comment


        #4
        I rebooted, reloaded NT8 everything (remember no logic), enabled the strategy and all was fine for a few minutes until I positioned the hairline on the chart with the strategy and moved the bars to the left and everything froze. This an NT8 thing.

        Windows10 21H2

        Comment


          #5
          Hello Anthony_0709,

          Please try this test again using the SampleMACrossOver, if you see that strategy produce the problem then please list the specific steps you had used to see it.

          I am not sure what you mean by " until I positioned the hairline on the chart with the strategy ", Are you referring to the chart crosshair?
          JesseNinjaTrader Customer Service

          Comment


            #6
            Yes, the chart crosshair. The freezing occurs when scrolling the chart with the strategy.
            Last edited by Anthony_0709; 05-13-2022, 11:02 AM.

            Comment


              #7
              I made sure all workspaces were closed, opened a new workspace with 1 chart loaded the strategy and it runs until I try to scroll back in time...then is when it freezes.

              I tried this:

              protected override void OnBarUpdate() {return;}

              And now it takes longer to freeze. I can scroll to the past, but on the way back to the present it freezes. Any ideas ?

              Comment


                #8
                Hello Anthony_0709,

                Are you seeing that happen with the SampleMACrossOver?

                If so I would likely suggest trying to do a re install of the platform. Also clearing the data cache and reloading historical data.

                With NinjaTrader closed remove the folders inside of: Documents\NinjaTrader 8\db\cache

                After re installing/repairing by using the installer, open a chart and reload historical data.

                Check that the chart and crosshair work before applying the SampleMACrossOver.

                If you still see the problem please let me know

                JesseNinjaTrader Customer Service

                Comment


                  #9
                  I had a fresh install of the platform yesterday by one of your technicians. "Documents\NinjaTrader 8\db\cache " should be healthy

                  Comment


                    #10
                    I did everything you instructed, no problems with SampleMACrossOver, but the problem continues with my strategy.
                    I also notice that if I don't scroll the chart when my strategy is running, no freezing occurs. I'm of the opinion that this is an NT8 issue.
                    what is the limit of data series that a strategy can load? I'm employing the built-in Renko, ninZaRenko, HeikenAshi Volume & KeikenAshi Minute.
                    Three day of data. Do you see any incompatibilities or memory issues in this scenario?
                    Last edited by Anthony_0709; 05-14-2022, 12:10 AM.

                    Comment


                      #11
                      Hello Anthony_0709,

                      I'm of the opinion that this is an NT8 issue.
                      If you only see the problem with your script then its something in that script which is causing the issue. That is could be the way that some logic is being used. You also mentioned using a third party bars type so that is another area to explore.

                      what is the limit of data series that a strategy can load?
                      That would depend on the performance of your system, there is not a pre defined limit.

                      I'm employing the built-in Renko, ninZaRenko, HeikenAshi Volume & KeikenAshi Minute.
                      If you are using multiple data sources and have excluded the other code then you would need to limit what you are trying to see which part is causing the issue. You can use the process of elimination and testing to find the combination of logic which brings up the error and then we would take a look at specifically that logic to make sure that's valid. I would suggest to exclude any third party bars types for the purpose of testing.
                      JesseNinjaTrader Customer Service

                      Comment


                        #12
                        Hi, sorry I didn't report earlier. I found the problem to be with the ninZaRenko 5.1 bar type. It's not the strategy because other bar types work. Thanks a lot.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by viaketopills, Today, 12:24 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post viaketopills  
                        Started by BellaMerril, Today, 12:09 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post BellaMerril  
                        Started by kaywai, Yesterday, 11:36 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post kaywai
                        by kaywai
                         
                        Started by Havencapital, Yesterday, 11:27 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post Havencapital  
                        Started by AdeptistJune, Yesterday, 10:00 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post AdeptistJune  
                        Working...
                        X