• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Long running function in State.Terminated

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

    #16
    Hello Chris!

    Thank you very much for the support.
    Any estimations when new update will be released?

    Comment


      #17
      Hello,

      Thank you for the reply.

      There should be an update rolling out early next month or so. I will update this forum post once it is released.

      Please let me know if I may be of any further assistance.
      Chris L.NinjaTrader Customer Service

      Comment


        #18
        Hello,

        NinjaTrader 8 R12 was released. This issue has been fixed.

        https://ninjatrader.com/support/help.../?8_0_12_0.htm
        Chris L.NinjaTrader Customer Service

        Comment


          #19
          Hello Chris!

          Sorry for the long delay with reply. I’ve been testing different ways to ensure proper termination of my indicators, what has taken time. Let me know, if I need to create another thread.

          After R12 update, I can see OnWindowDestroy for Control Center window. Thank you. At the same time there is still one issue: Control Center OnWindowDestroy can come at any time: before termination message is sent to all indicators or after it was sent to some. So, if AddOn cleanup is done in OnWindowDestroy (as it is recommended in documentation) and indicators need to use functions from AddOn in their State.Terminated, you can’t be sure that required resources are still exist in AddOn. This makes code much more complicated (corresponding checks, locks etc) and is increasing running time of the code in State.Terminated
          Therefore the question:
          Can you consider the possibility to send OnWindowDestroy of Control Center window after all other windows are closed or, to be more precise, after State.Terminated is finished in all indicators?


          In fact, all my issues are happening because State.Terminated is not always arriving to the indicators as well as to the AddOn (see first post in this thread) . To illustrate this, I’ve modified an example from the first post.
          Closing NT8 while attached code is running on 10+ charts will show that State.Terminated is not send to all indicators or, sometimes, even it has arrived, its execution is not finished. Hence another set of questions:
          1. Is that a correct behavior of NT8 that State.Terminated is not always arriving to the indicators?
          2. Is that a correct behavior of NT8 that State.Terminated is not always finished (I suspect the thread is closed).

          Thank you very much in advance
          GmA
          Attached Files

          Comment


            #20
            Hello.

            Thanks for the follow up.

            I am inquiring with our product management team to see if this behavior is expected. I can confirm that the termination state was not complete for an instrument in my testing of your script.

            I will reply with my findings shortly.
            Chris L.NinjaTrader Customer Service

            Comment


              #21
              Hello Chris!

              Thank you.
              Will be waiting for your reply

              Kind regards
              GmA

              Comment


                #22
                Hello Chris!

                One additional observation.
                I am using 3 data connections: Continuum (for futures), FXCM (for forex) and Kinetick (for End of Day).
                After loading Test indicator on 15 charts (5 per each data feed) I've disconnected all 3 data feed and have connected them back in few minutes. State.Terminated has been received by only 10 charts.

                Not sure if this is important, but better I'll share it.

                Thank you
                GmA

                Comment


                  #23
                  Hello Chris!

                  Sorry for bothering.
                  Any update from product management team?

                  Thank you very much in advance
                  GmA

                  Comment


                    #24
                    Hello.

                    Thanks for the follow up.

                    We are still waiting on a confirmation to see if this is expected or not. If it turns out to be expected, I would submit a feature request to have this changed.

                    Please let us know if you have any questions.
                    Chris L.NinjaTrader Customer Service

                    Comment


                      #25
                      Hello Chris!

                      Any further update?

                      Thank you in advance
                      GmA

                      Comment


                        #26
                        Hello.

                        Sorry, but there is no update for this item at this time. I will update this thread when I learn any news.

                        Please let us know if you have any questions.
                        Chris L.NinjaTrader Customer Service

                        Comment


                          #27
                          Hello Chris!

                          Did you get any update from Product Management Team?

                          Thank you in advance
                          GmA

                          Comment


                            #28
                            Hello gma17,

                            Thanks for the follow up.

                            This item has been reported to the development team and will be changed in later revisions.

                            When this issue gets solved it will be posted on our release notes page below:

                            https://ninjatrader.com/support/help...ease_notes.htm

                            Please refer to that page whenever an update is released to keep track of bug fixes and feature additions.

                            Please let us know if you have any questions.
                            Chris L.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by supermht, Today, 10:13 PM
                            0 responses
                            0 views
                            0 likes
                            Last Post supermht  
                            Started by supermht, Today, 07:59 PM
                            0 responses
                            2 views
                            0 likes
                            Last Post supermht  
                            Started by mohdhm, Today, 05:13 PM
                            1 response
                            12 views
                            0 likes
                            Last Post nkhoi
                            by nkhoi
                             
                            Started by 3lliot, Today, 05:55 PM
                            0 responses
                            2 views
                            0 likes
                            Last Post 3lliot
                            by 3lliot
                             
                            Started by Fargo, Today, 04:57 PM
                            0 responses
                            11 views
                            0 likes
                            Last Post Fargo
                            by Fargo
                             
                            Working...
                            X