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

Shared Menu

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

    Shared Menu

    I have two indicators that need a custom Menu.

    I have added a toolbar menu from one indicator like described in this forum. Now the other indicator need to have a custom menu too but I do not want to add another toolbar menu to save space on the chart. Ideally I would like the second indicator to add menu items to the one created by the other indicator or visa versa if the other indicator is loaded first.

    Is there a way to do this ?


    #2
    Hello blar58,

    Thank you for the question.

    This may or may not be possible depending on the load order of the indicators and when the toolbar is being found. You can likely use an automation id with your toolbar to make it easily found with the other indicator, however, the load order will create a problem in case the indicator looking for the toolbar loads before the toolbar is added. You can test this to see how the result is and see if that will work for the goal you have. I would likely suggest taking the automation ID creation logic from the following sample:



    This shows both setting an automation id to a control and retrieving the control by its automation id. The indicator looking for the toolbar would use the code to retrieve the control by its automation ID to find the toolbar and then append its controls.

    I don't know of an existing sample which uses this type of logic as noted there are likely going to be issues surrounding loading. If you implement this type of logic and can't seem to get it working I would be happy to take a look at what you have to see if I can be of further assistance.




    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AttiM, 02-14-2024, 05:20 PM
    11 responses
    184 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by fernandobr, Today, 09:11 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by timmbbo, Today, 08:59 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by KennyK, 05-29-2017, 02:02 AM
    2 responses
    1,281 views
    0 likes
    Last Post marcus2300  
    Started by itrader46, Today, 09:04 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X