Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get ChartTrader ATM strategy name string from indicator

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

    Get ChartTrader ATM strategy name string from indicator

    I would like to retrieve the current selected ATM Strategy name string in the ChartTrader combobox from an indicator. I am able to use the code below to get the order qty but it does not work with the ATM strategy.

    Code:
    Grid ctGrid = ((chartTrader.FindFirst("ChartWindowChartTraderControl") as ChartTrader).Content as System.Windows.Controls.Grid).Children[1] as System.Windows.Controls.Grid;
    TextBox tboQuantity = ctGrid.FindFirst("ChartTraderControlQuantityEdit") as TextBox;
    quantity = Int32.Parse(tboQuantity.Text, NumberStyles.AllowThousands);
    
    // FOLLOWING DOES NOT WORK
    Grid ct2Grid = ((chartTrader.FindFirst("ChartWindowChartTraderControl") as ChartTrader).Content    as System.Windows.Controls.Grid).Children[2] as System.Windows.Controls.Grid;
    ComboBox cboStrategy = ct2Grid.FindFirst("ChartTraderControlATMStrategySelector") as ComboBox;
    strategy = cboStrategy.SelectedItem.ToString();
    It returns the following strategy = "name='AtmStrategy' id=-1" no matter what the actual strategy name string is. Actually it does return the correct string when the "None" selection is made.

    I think it does not work because the items in the ATM strategy combobox are not simple text but some undocumented objects for the "i" and "remove" etc. Can you please provide an example of retrieving the ATM Strategy name from the combobox or using any other method available to do it.
    Last edited by seahn; 01-13-2017, 07:46 PM.

    #2
    Hello,

    Thank you for the post.

    I had previously commented on this topic in this thread: http://ww.ninjatrader.com/support/fo...44&postcount=7

    You are correct, the object and property used would be custom rather than the SelectedValue.

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

    Comment


      #3
      Hi Jesse

      Is possible to acsses the ATMStrategy Name from SuperDom??

      Thanks

      Comment


        #4
        Hello MarceloF,

        Yes, that would be possible and would be nearly identical to the chart trader sample:


        The ID is SuperDOMControlATMStrategySelector.

        What context are you trying to access this from? Is this an indicator or addon? Where would this information be needed?

        I look forward to being of further assistance.

        Comment


          #5
          Indicator

          Thanks Jesse

          Comment


            #6
            Hello MarceloF,

            Would this be an indicator in a chart or applied directly to the dom?

            From a chart, you would need to use the Globals.AllWindows collection and find the dom you wanted to target.

            From the indicator applied to the dom, you could use the Parent property just like you would in the ChartTrader example.

            Can you clarify what specific indicator application you wanted? With more specific details I can provide more specific direction.

            I look forward to being of further assistance.

            Comment


              #7
              Hi Jesse

              Jesse I got it ... it was very difficult but I got it ... it was by the Globals.AllWindows ... regards and see you soon

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              566 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              330 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              547 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              548 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X