Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get Chart interval selection in Addon

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

    How to get Chart interval selection in Addon

    Hello everyone,

    I try to identify within an Addon which Chart interval the user is requesting within the minute selection.

    I looked into barsRequest, eg. barsRequest.Bars.BarsPeriod.BaseBarsPeriodValue, but it's always 1 Minute.

    Click image for larger version

Name:	2021-03-23 22_02_15-Window.png
Views:	430
Size:	24.4 KB
ID:	1148167

    How to get the real selection?

    Thanks in advance.

    Airwave
    NinjaTrader Ecosystem Vendor - Airwave

    #2
    Hello, thanks for your post.

    See this post that has an example on accessing each ChartControl object of each chart window within the workspace:

    https://ninjatrader.com/support/foru...ons#post837439

    You should be able to access the bar period value from there, please set up a test to confirm.

    Kind regards.

    Comment


      #3
      Hello, thanks for your reply.

      A user had a similar issue here:
      https://ninjatrader.com/support/foru...dow#post782519

      Was resolved by using the NTMenuItem:

      https://ninjatrader.com/support/help...ntmenuitem.htm

      There is an example on that forum thread as well.

      Please let me know if this does not resolve your inqury.

      Comment


        #4
        Originally posted by NinjaTrader_ChrisL View Post
        Hello, thanks for your reply.

        A user had a similar issue here:
        https://ninjatrader.com/support/foru...dow#post782519

        Was resolved by using the NTMenuItem:

        https://ninjatrader.com/support/help...ntmenuitem.htm

        There is an example on that forum thread as well.

        Please let me know if this does not resolve your inqury.
        Ahh, sooorrryy I mixed up two of my threads and posted in the wrong one. Think that lead into some missunderstanding.
        I deleted my post here and added to the right one.

        Thanks for understanding.
        Airwave
        NinjaTrader Ecosystem Vendor - Airwave

        Comment


          #5
          Hi there,

          with protected override void OnWindowDestroyed(Window window) I get everything, what I need.

          But this event is not executed when a user does a selection within following menu.
          Is there an event or other possibility to get the users selection?

          Thanks in advance





          Airwave
          NinjaTrader Ecosystem Vendor - Airwave

          Comment


            #6
            Hello Airwave, thanks for your reply.

            Accessing chat functions and events through an addon is not officially supported so there is nothing documented showing how to do this, unfortunately.

            Comment


              #7
              Hey Chris,

              but unofficial that is possible? Is there a way of researching this?

              Thanks


              Airwave
              NinjaTrader Ecosystem Vendor - Airwave

              Comment


                #8
                Hello Airwave, thanks for your reply.

                I am not sure if it is possible. You would need to look through the relevant objects in Intellisense to see what undocumented events are available to use.

                Best regards.

                Comment


                  #9
                  Originally posted by Airwave View Post
                  Hello everyone,

                  I try to identify within an Addon which Chart interval the user is requesting within the minute selection.

                  Hi Airwave,

                  I asked a related question and was quite pleased with the reponse here https://ninjatrader.com/support/foru...-ticks-per-bar

                  Does that info provide any help?

                  HedgePlay

                  Comment


                    #10
                    Thanks a lot, hedgeplay,

                    That guide me in the write direction. :-)


                    But, I'm at the next boarder now:

                    I need to identify the chart window in any way in the IAdapter.RequestBars adapter:

                    void IAdapter.RequestBars(IBars bars, Action<IBars, ErrorCode, string> callback, IProgress progress)
                    {
                    <how to identify the chart window here?>
                    }

                    Is there a possibility? Or is there another way to get the selected period in this adapter?

                    Thanks in advance.
                    Last edited by Airwave; 04-04-2021, 02:18 PM.
                    Airwave
                    NinjaTrader Ecosystem Vendor - Airwave

                    Comment


                      #11

                      Hi Airwave,

                      I have not developed against the iAdapter constructs so wont be much help on this topic.

                      All I have is.... I believe I remember a post where the post details and attached example DLL apps were posted as reference to check in regards to a question about using iadapter https://ninjatrader.com/support/foru...art#post793626

                      I don't feel strongly this will be a direct reference for what you seek.

                      HedgePlay

                      Comment

                      Latest Posts

                      Collapse

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