• 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

Alerts on multiple instruments

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

    #16
    Hello, i was looking at the sample code RightClickChartAdded above.

    Is there any reason why ChartControl.Dispatcher.InvokeAsync(new Action(() => is used in the opening and not the closing of context menu?

    I have something i have been using but notice on occassion the closing function of context menu is not being called

    thanks

    Comment


      #17
      Hello explorer101,

      The Dispatcher would be needed in State.Historical because this state is not processed by the UI thread and we will need to Dispatch to the UI thread for any UI related work.

      The Dispatcher in ChartControl_ContextMenuOpening would not be needed since the method is already subscribed to the ChartControl.ContextMenuOpening Event Handler. It is already being fired from the UI thread.

      Let us know if you have any additional questions.
      JimNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by chrismcdermut, Yesterday, 01:46 PM
      3 responses
      19 views
      0 likes
      Last Post MojoJojo  
      Started by Bricolico, Yesterday, 09:28 PM
      0 responses
      5 views
      0 likes
      Last Post Bricolico  
      Started by Tradwell385, Yesterday, 08:51 PM
      0 responses
      7 views
      0 likes
      Last Post Tradwell385  
      Started by dvcpro4, Yesterday, 07:08 PM
      0 responses
      21 views
      0 likes
      Last Post dvcpro4
      by dvcpro4
       
      Started by pennywise, Yesterday, 06:40 PM
      0 responses
      8 views
      0 likes
      Last Post pennywise  
      Working...
      X