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


                          #13
                          I'm now noticing that whenever I create a new chart and make the primary data series equal to one of the secondary data series in the strategy, the chart the strategy is on and the new chart freeze and sometimes Windows will report that the app is not responding and gives the option to close NT8.
                          The strategy has 8 secondary data series and its primary data series can't be equal to any of the secondary or else the chart will freeze after scrolling a few times. If I don't scroll, it works as it should.
                          I would like to see how the secondary data series are plotting when the strategy is running but NT is freezing whenever I create a chart equal to any of the secondary data series in the strategy. No indicators are being used. Nothing in LOG tab.
                          Has anybody experienced this?

                          Thanks
                          Last edited by Anthony_0709; 06-06-2022, 12:59 PM.

                          Comment


                            #14
                            Hello Anthony_0709,

                            I am not certain I understand your goal, if you want to use the series that is equal to the chart series you use bars in progress 0, no secondary series is needed for that.

                            JesseNinjaTrader Customer Service

                            Comment


                              #15
                              Hi Jesse,

                              I don't want to use a series that is equal to the chart series. I am just using charts with series equal to the strategy's secondary series TO SOMETIMES SEE what is going on, and whenever I do so: any chart with a series equal to one of the strategy's series stops plotting price action and its chart trader doesn't update BID/ASK, any other chart with a different series ALSO stops plotting price action BUT keeps updating BID/ASK.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Radano, 06-10-2021, 01:40 AM
                              19 responses
                              604 views
                              0 likes
                              Last Post Radano
                              by Radano
                               
                              Started by KenneGaray, Today, 03:48 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post KenneGaray  
                              Started by thanajo, 05-04-2021, 02:11 AM
                              4 responses
                              470 views
                              0 likes
                              Last Post tradingnasdaqprueba  
                              Started by aa731, Today, 02:54 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post aa731
                              by aa731
                               
                              Started by Christopher_R, Today, 12:29 AM
                              0 responses
                              11 views
                              0 likes
                              Last Post Christopher_R  
                              Working...
                              X