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

AtmStrategySelector - setting a default value

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

    AtmStrategySelector - setting a default value

    I have added my own instance of an AtmStrategySelector to a chart using an indicator. I would like to set the default selected value to an Atm Strategy instead of "None". However any event listener I have attempted to use (SelectionChanged, CustomPropertiesChanged, Loaded, etc) do not work. When they fire for the first time when the indicator is loaded, it always returns 4 items (I use atmStrategySelector.Items.Count to see how many items there are). And those 4 items are all Separators. Only when I call the selector from from OnRender() do I get the full list of all the values. So it seems the values are loaded with some delay?

    But I don't think attemting to set the default value from OnRender is the best place to do that. What is the timing or load order of the Atm Strategies? Is there an event that will fire after all the values have been loaded? Or is there a selector option that is something like "DesiredAtmStrategy" that can be set?

    Thanks.
    Last edited by martyn73; 11-17-2019, 03:39 PM.

    #2
    Hi martyn73, thanks for your post.

    The code to set a default value doesn't exist in Ninjatrader, so this will need to be submitted as a feature request. I will post a feature tracking ID in the next couple of business days.

    Thanks in advance for your patience.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Yes, would like to see this added. As a work around I now read the list of atm strategies, figure out it's index order. Then add 4 to it because that appears to be where they start on the selector. Then use atmStrategySelector.SelectedIndex to set the default value. So not a straight forward solution.

      Comment


        #4
        Originally posted by martyn73 View Post
        I have added my own instance of an AtmStrategySelector to a chart using an indicator. I would like to set the default selected value to an Atm Strategy instead of "None". However any event listener I have attempted to use (SelectionChanged, CustomPropertiesChanged, Loaded, etc) do not work. When they fire for the first time when the indicator is loaded, it always returns 4 items (I use atmStrategySelector.Items.Count to see how many items there are). And those 4 items are all Separators. Only when I call the selector from from OnRender() do I get the full list of all the values. So it seems the values are loaded with some delay?

        But I don't think attemting to set the default value from OnRender is the best place to do that. What is the timing or load order of the Atm Strategies? Is there an event that will fire after all the values have been loaded? Or is there a selector option that is something like "DesiredAtmStrategy" that can be set?

        Thanks.
        Hello martyn73,

        I´m trying to create something similar.. wouldn´t you mind to share your indicator?

        Thank you
        emuns

        Comment


          #5
          Hi all, the feature tracking ID for this request is #4499
          Chris L.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_ChrisL View Post
            Hi all, the feature tracking ID for this request is #4499
            Hello Chris,

            add my vote for this feature request please.

            Thank you

            Comment


              #7
              Hello emuns,

              We have added your vote.

              Thanks for sharing your interest.
              JimNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ChrisL View Post
                Hi all, the feature tracking ID for this request is #4499
                Hi !
                Any news about this ?
                pmaglio
                NinjaTrader Ecosystem Vendor - The Indicator Store

                Comment


                  #9
                  Hello pmaglio, thanks for the follow up.

                  This is still open. I have added another vote to this request for you.

                  Kind regards.
                  Chris L.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bmartz, 03-12-2024, 06:12 AM
                  5 responses
                  32 views
                  0 likes
                  Last Post NinjaTrader_Zachary  
                  Started by Aviram Y, Today, 05:29 AM
                  4 responses
                  13 views
                  0 likes
                  Last Post Aviram Y  
                  Started by algospoke, 04-17-2024, 06:40 PM
                  3 responses
                  28 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by gentlebenthebear, Today, 01:30 AM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by cls71, Today, 04:45 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Working...
                  X