Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Menu Items from different indicators

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

    Adding Menu Items from different indicators

    I want to add menu items to Ninja Trader main toolbar menu from multiple indicators.

    I can see menu items added from only one indicator. The others are not visible.

    What could cause this problem ?


    Thank you !





    #2
    Hello blar58,

    Thanks for your post.

    Without full context of the code, we are only left to speculate at the issue. It could be that one indicator is hitting an error, or there is some code that is preventing the new items from being added.

    For example, if we look at NinjaTader_Chelsea's ChartToolBarCutsomMenuExample, then we can see the there is code that sets an Automation ID for "theMenu." That Automation ID is searched before adding any menu items, and if it is found, the controls are not re-added. See lines 81-83 and line 97 in this example. I may recommend modelling after this example to achieve your goal.

    Demo - https://drive.google.com/file/d/1r6A...w?usp=drivesdk

    Chelsea's examples can be found here - https://ninjatrader.com/support/foru...considerations

    Please let us know if we can be of further assistance.

    Comment


      #3
      Thank you Jim,

      Yes I am using exactly ChartToolBarCutsomMenuExample code and set an Automation ID for "theMenu". When I shrink the chat I also seeing only one item from the arrow down.

      Comment


        #4
        Hello blar58,

        The Automation ID code is used to prevent the same control to be added when a control is found and has that name. When I test the example with the Automation ID code commented, the code to add a new control is not skipped and each indicator add's its own controls. I also see each additional menu appear when the chart is shrinked. I may suggest to perform the same changes I have made in my demonstration against an unmodified version of the example to test on your end.

        Please let me know if you are seeing different results after testing with the original version.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        163 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X