• 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

How to add rows (instruments) to Market Analyzer Windows programatically?

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

  • NinjaTrader_AlanP
    replied
    Hello jmneto,

    I had written a ChartButtonChangeInstrumentTimerRaiseEvent sample which added a chart button to the chart and when pressed would switch the chart symbol, but because the button was added within the ChartControl, it was easy to focus on the chart portion.

    I do not have any documented samples which demonstrate how you could do this on the market analyzer however have submitted the feature request for this.

    Please let us know if you need further assistance.

    Leave a comment:


  • jmneto
    replied
    I was able to progress a bit by sending Keystrokes to Market Analyzer. But it only works if I have the Focus on Market Analyzer. You guys have helped me before with similar technique for sending keystrokes for a chart.

    I got the code below working but only if Market Analyzer has focus. How can I set the focus to Market Analyzer?


    // send a key event to trigger the instrument overlay selector to appear
    Keyboard.FocusedElement.RaiseEvent(new TextCompositionEventArgs(InputManager.Current.Prim aryKeyboardDevice, new TextComposition(InputManager.Current, Keyboard.FocusedElement, "open sesame")) { RoutedEvent = TextCompositionManager.PreviewTextInputEvent });

    // send the actual string you want in the instrument overlay selector
    Keyboard.FocusedElement.RaiseEvent(new TextCompositionEventArgs(InputManager.Current.Prim aryKeyboardDevice, new TextComposition(InputManager.Current, Keyboard.FocusedElement, "AAPL")) { RoutedEvent = TextCompositionManager.TextInputEvent });

    //send the enter key
    Keyboard.FocusedElement.RaiseEvent(new KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Enter) { RoutedEvent = Keyboard.PreviewKeyDownEvent });



    I need something equivalent to this code below that sets the focus to a chart:

    // explicity give the chart focus
    ChartControl.OwnerChart.Focus();


    I need something similar that would set the focus to the Market Analyzer

    Leave a comment:


  • NinjaTrader_AlanP
    replied
    Hello jmneto,

    Thank you for your note.

    This would not be possible however I will submit a feature request for this.

    Please let us know if you need further assistance.

    Leave a comment:


  • How to add rows (instruments) to Market Analyzer Windows programatically?

    Hi,

    How can I programmatically add rows(instruments) to a Market Analyzer window?

    My objective is from an indicator or strategy to add Instruments to the Market Analyzer Window.

    Thank you!
    jmneto

Latest Posts

Collapse

Topics Statistics Last Post
Started by caveat_lector, Today, 12:12 AM
0 responses
3 views
0 likes
Last Post caveat_lector  
Started by ksarin, Yesterday, 04:31 PM
1 response
7 views
0 likes
Last Post NinjaTrader_Marco  
Started by pharofx, Yesterday, 09:30 PM
0 responses
17 views
0 likes
Last Post pharofx
by pharofx
 
Started by swcooke, Yesterday, 08:39 PM
0 responses
8 views
0 likes
Last Post swcooke
by swcooke
 
Started by bboyle1234, Yesterday, 08:10 PM
1 response
17 views
0 likes
Last Post bboyle1234  
Working...
X