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 Stanfillirenfro, Today, 07:23 AM
      4 responses
      18 views
      0 likes
      Last Post Stanfillirenfro  
      Started by DayTradingDEMON, Today, 09:28 AM
      1 response
      13 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
      6 views
      0 likes
      Last Post navyguy06  
      Working...
      X