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

What´s the NT8 equivalent to Forms.Closing event?

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

    What´s the NT8 equivalent to Forms.Closing event?

    Is there an event for NT8 closing/closed?

    #2
    Hello FREEN,

    Thank you for the question.

    Not specifically, what is the overall use case here? The windows forms events you may have previously used would not be something which has a specific NinjaScript alternative, you would instead be looking for a WPF alternative to those actions. This is something you can use google to search for C# alternatives in contrast to WPF programming.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      My objective is to close some background processes as i close NT8. Hence a closing (as in application closing) event would be in handy.

      Comment


        #4
        Hello FREEN,

        Thank you for clarifying.

        In the situation of using a NinjaScript object, it would be suggested to use the objects OnStateChange and its Terminated state to handle this type of use. If you are using a type without OnStateChange or are doing something custom where that does not apply it would be up to you to handle that case in your own custom way.

        If you were previously using the form and the windows forms events, the alternative would be wpf events however this is not something which is documented for either platform. You can research this topic further on the support forum by searching for the WPF event name you wanted to use/control you wanted to target. You can find more relevant help about WPF events in external WPF education resources.

        You can also see the following post about adding a menu to the control center for some ideas of targeting specific windows: https://ninjatrader.com/support/foru...-controlcenter


        Please let me know if I may be of additional assistance.




        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks for pointing me in the right direction Jesse!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mongo, Today, 11:05 AM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by traderqz, Today, 12:06 AM
          6 responses
          13 views
          0 likes
          Last Post traderqz  
          Started by Skifree, Today, 03:41 AM
          3 responses
          13 views
          0 likes
          Last Post Skifree
          by Skifree
           
          Started by traderqz, Yesterday, 09:06 AM
          5 responses
          34 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by guillembm, Today, 11:25 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X