Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,603 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X