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

How to print "_myChart.ActiveChartControl" Parent Items ??

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

    How to print "_myChart.ActiveChartControl" Parent Items ??

    Hi all,

    I am developing an Addon and couple of indicators and would like to know all the "Text_String_Calls" for the Window.GetWindow( _myChart.ActiveChartControl.Parent).FindFirst("Cha rtWindowInstrumentSelector") ~ which in this case is "ChartWindowInstrumentSelector"

    Is there a way to Print them all to Output Screen? I have tried a few different approaches but have been unsucessful:

    ie/
    foreach (var Parent in _myChart.ActiveChartControl.)
    {
    Print(
    _myChart.ActiveChartControl.ToString
    );
    }

    #2
    Hello Blairski,

    Could you provide more details about what you are trying to find in the window? I am not sure what you mean by "Text_String_Calls".

    If you are referring to the automation ids: FindFirst("ChartWindowInstrumentSelector") You can use Microsoft inspect tool or AccessibilityInsights to browse the controls in a window. Here is a public link to AccessibilityInsights: https://accessibilityinsights.io/

    Those type of WPF exploration programs can be used to mouse over controls in a window and reveal properties about that control. The automation ID's can be turned on in the configuration of AccessibilityInsights so you can mouse over controls to see what their ID's are.

    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      I downloaded AccessibilityInsights and was not getting information I was looking for or need. Is there a way I can print automation IDs with NinjaScript as per example I provided above?

      Please note that the automation ID that AccessibilityInsights provided for the instrument box in top left corner of chart was not "ChartWindowInstrumentSelector" but rather ChartWindowInstrumentSelectorMenuItem".
      Attached Files

      Comment


        #4
        Hello Blairski,

        I am not aware of a way to print the ids. We generally just use one of the external tools to browse the structure of the window for the element in question. In some situations you may need to use the tree view in the external application to find the control you need if the mouse over was not accurate or got you a outer control like a menu item. WPF controls are nested so you sometimes will need to re select the correct area in the control to get the right id. Automation ids are added for convenience but there is no documentation/list of ids or easy way to print them from NinjaScript.


        Please let me know if I may be of additional assistance.



        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi Jesse, NTS,

          Is it possible to provide a print screen(s) of what the AccessibilityInsights or Microsoft inspect tool screen should look like when capturing the automation ID's with NinjaTrader charts?

          Kind Regards

          Comment


            #6
            Hello Blairski,

            The only item which you would need to enable is automation ID's in AccessibilityInsights, in inspect the automation ID should be present in the list if it is available. Looking at the main screen of AccessibilityInsights you can click the Gear icon on the top right, that will let you choose Configure the columns to always shown, you can double click Automation ID's in the left list to move it to the right list, that will keep it visible when mousing over controls.

            Also keep in mind not everything has automation ID's, there are only select controls in the platform with ID's, if you mouse over something which does not show an ID there is a good chance it just does not have an ID.


            Please let me know if I may be of additional assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by frankthearm, Yesterday, 09:08 AM
            14 responses
            47 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by gentlebenthebear, Today, 01:30 AM
            2 responses
            13 views
            0 likes
            Last Post gentlebenthebear  
            Started by Kaledus, Today, 01:29 PM
            2 responses
            8 views
            0 likes
            Last Post Kaledus
            by Kaledus
             
            Started by PaulMohn, Today, 12:36 PM
            2 responses
            16 views
            0 likes
            Last Post PaulMohn  
            Started by Conceptzx, 10-11-2022, 06:38 AM
            2 responses
            56 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Working...
            X