NexusFi: Find Your Edge


Home Menu

 





SetActiveWindow in NT


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one redratsal with 6 posts (3 thanks)
    2. looks_two terratec with 5 posts (1 thanks)
    3. looks_3 Big Mike with 2 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,295 views
    2. thumb_up 4 thanks given
    3. group 0 followers
    1. forum 13 posts
    2. attach_file 0 attachments




 
Search this Thread
  #11 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,216
Thanks Received: 2,090

Activate window, close window, bring window to front : WindowWindows Presentation FoundationC# / CSharp Tutorial

this is the part that should interest you:

 
Code
 private void btnBringToFront_Click(object sender, RoutedEventArgs e)
        {
            Window window = lbxWindows.SelectedItem as Window;

            if (window != null)
                window.Activate();
        }


Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
CME Group CEO Calls CFTC-Approved Crypto Perps Dangerous …
Traders Hideout
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
3 thanks
  #12 (permalink)
 terratec 
Zurich Switzerland
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES, 6E, CL
Posts: 403 since Sep 2009
Thanks Given: 64
Thanks Received: 517


redratsal View Post
Another solution is via c#, I haven't tested it yet but you can look here (if you haven't already done it):

Activated Event

C# would be my preferred way. But it needs more programming skills than I have… I am working on it.


Started this thread Reply With Quote
  #13 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,216
Thanks Received: 2,090



terratec View Post
C# would be my preferred way. But it needs more programming skills than I have… I am working on it.

The problem with c# is with the name of the window, you will have to match the exact name, that means if you change the contract of your instrument you will have to remember to change, in the code, the new name of your window. With AHK you do not need to match the exact name you can set any character starting with; for example 6E and that makes things easier to handle.


Visit my NexusFi Trade Journal Reply With Quote
  #14 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,577

You can get the full instrument name with Instrument.MasterInstrument.Name or something like this (been too long). It would include the expiration, or if not there is another option for .Expiry or similar. Point is, you should be able to determine any NT-generated window title name.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on December 3, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts