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 DayTradingDEMON, Today, 09:28 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          8 responses
          31 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by helpwanted, Today, 03:06 AM
          2 responses
          22 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by navyguy06, Today, 09:28 AM
          0 responses
          5 views
          0 likes
          Last Post navyguy06  
          Started by rjbtrade1, 11-30-2023, 04:38 PM
          2 responses
          77 views
          0 likes
          Last Post DavidHP
          by DavidHP
           
          Working...
          X