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

How to call FindWindow, PostMessage

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

    How to call FindWindow, PostMessage

    I want to occasionally post a windows message to via PostMessage from my indicator to another window.



    How do you call FindWindow and PostMessage from c# in NT7?

    #2
    Hello AusTrader,

    When you mention "from my indicator to another window" are you referring to a new window within NinjaTrader?

    Or are you referring to an external application?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I am referring to an external application.

      I have now resolved the problem by creating a .NET 3.5 DLL in Visual Studio 2013 to call FindWindow and PostMessage.


      It would be cleaner to be able to call it direct from NT7 but this external DLL is working fine.

      Comment


        #4
        Hello AusTrader,

        This would be outside of what is supported by NinjaTrader Support.

        Should you need further assistance, this thread will remain open for any community members that would like to assist.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by AusTrader View Post
          I am referring to an external application.

          I have now resolved the problem by creating a .NET 3.5 DLL in Visual Studio 2013 to call FindWindow and PostMessage.


          It would be cleaner to be able to call it direct from NT7 but this external DLL is working fine.
          Much cleaner indeed.

          I found this by searching for "C# FindWindow" in Google.

          Comment


            #6
            Don't forget to add this,

            Code:
            using System.Runtime.InteropServices;
            to the top of your code.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jeronymite, 04-12-2024, 04:26 PM
            2 responses
            28 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by Mindset, 05-06-2023, 09:03 PM
            10 responses
            262 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by michi08, 10-05-2018, 09:31 AM
            5 responses
            741 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by The_Sec, Today, 02:29 PM
            0 responses
            2 views
            0 likes
            Last Post The_Sec
            by The_Sec
             
            Started by tsantospinto, 04-12-2024, 07:04 PM
            4 responses
            62 views
            0 likes
            Last Post aligator  
            Working...
            X