Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

unique Identification for Tabs

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

    unique Identification for Tabs

    Hi,

    With Chart Windows we can uniquely identify them, but so far we have not found a way to do this between different Tabs in the same Chart Window. Is this possible and if not, can I please ask for this to be added.

    The reason is that when we wish to save and restore 3rd party analysis we need to be able to identify which Chart Window and which Tab in that Chart Window is being used.

    Can you help please.................

    #2
    Hi SteveGriffiths,

    You can right-click on tabs > left-click Rename to adjust the name of a particular tab. If that's not what exactly you have in mind to differentiate them, please let me know.
    <span class="name">Alex C.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi Alex,

      Thanks for your reply, but that is not what I meant. We are developers and after a way via program code to be able to uniquely identify the Tabs. We can do this between separate Chart Windows, but there does not seem to be any way (via program code) to be able to uniquely identify different tabs in the same chart window.

      So my question is whether there a unique identifier that is available via program code to be able to uniquely identify each separate Tab, or if not, can we please ask development to add one.

      Thanks

      Comment


        #4
        Hello SteveGriffiths,

        I am looking into this for you and will find follow up when I have additional information.

        Comment


          #5
          SteveGriffiths,

          Thank you for your patience.

          Attached is an example of pulling the tab header name when the mouse is over the tab control (the chart). Let me know if you have any questions.
          Attached Files

          Comment


            #6
            Hi Patrick,

            Thanks for your reply, but that is not what we are after. I will ask our programmer to add more detail so you can understand better.

            Thanks

            Comment


              #7
              Hi Patrick,

              What we are looking for is a unique identifier that we can use to uniquely identify the chart tab programmatically for the purposes of doing custom serialization. The name of the chart tab is not unique. If you have a window with two tabs with the same name, then that is not unique.

              For example, when saving custom drawn analysis on the chart for the purposes of being able to save it to disk, we use the unique ID of the chart - e.g. "ChartForm-<Guid>" to be able to deserialize and restore it to the proper chart. This is what we used in part in NT7 to save the analysis to disk and restore the analysis to the chart when the application is launched and the workspaces open.

              However, tabs do not have a similar identifier either at runtime or that is saved during the normal NT serialization of the workspace, meaning we have to do our own method of uniquely identifying instances of the indicator to account for the fact that a user may have multiple tabs on the same chart. We have been using an internal workaround that I developed, with some limitations, particularly using chart templates.

              So, what would be ideal is that tabs had their own identifier that was serialized with the chart window during workspace save - e.g. "ChartTab-<Guid>". This way, it is persisted when the application closes, won't change, and is not affected by mutable properties like the name of the chart tab.

              Hopefully that clarifies what we are looking for-

              Comment


                #8
                Hello sdonahue and Steve,

                Sorry for the delay, but yes I am looking into this - meaning I am researching if it is currently possible through the Workspace XAML or in NinjaScript. If not, I will submit through a feature request.

                Thank you for your patience.

                Comment


                  #9
                  Hi Patrick,

                  Brilliant, thank you.

                  I am sure there are a lot of other programmers who will need to access and use a unique ID for Tabs as well as Chart Windows.

                  Please let me know when you have a feature request number, so I can keep track of progress.

                  Thanks again for all your help

                  Steve

                  Comment


                    #10
                    Steve,

                    In speaking with development, we are curious what aspect of normal properties saving to the workspace is not adequate for your needs. Essentially, they just need more information on your request here.

                    If anyone else also has needs for this and can provide some details, it would be welcome.
                    Last edited by NinjaTrader_PatrickH; 01-25-2016, 08:54 AM.

                    Comment


                      #11
                      Hi Patrick,

                      The problem is that there is no unique way to identify the Tabs, here is what our programmer posted earlier:

                      " What we are looking for is a unique identifier that we can use to uniquely identify the chart tab programmatically for the purposes of doing custom serialization. The name of the chart tab is not unique. If you have a window with two tabs with the same name, then that is not unique.

                      For example, when saving custom drawn analysis on the chart for the purposes of being able to save it to disk, we use the unique ID of the chart - e.g. "ChartForm-<Guid>" to be able to deserialize and restore it to the proper chart. This is what we used in part in NT7 to save the analysis to disk and restore the analysis to the chart when the application is launched and the workspaces open.

                      However, tabs do not have a similar identifier either at runtime or that is saved during the normal NT serialization of the workspace, meaning we have to do our own method of uniquely identifying instances of the indicator to account for the fact that a user may have multiple tabs on the same chart. We have been using an internal workaround that I developed, with some limitations, particularly using chart templates.

                      So, what would be ideal is that tabs had their own identifier that was serialized with the chart window during workspace save - e.g. "ChartTab-<Guid>". This way, it is persisted when the application closes, won't change, and is not affected by mutable properties like the name of the chart tab. "

                      Please can you have development add in something like "ChartTab-<Guid>" that is all we need.

                      Thanks

                      Steve
                      Last edited by SteveGriffiths; 01-21-2016, 10:05 AM.

                      Comment


                        #12
                        Unique identity

                        “I agree, I need a way to uniquely identify different Chart Tabs, so this idea of adding "ChartTab-<Guid>" as suggested by sdonahue would be good, I believe it very essential to be able to make use of Separate Tabs in the same Chart Window “
                        Last edited by seefisch; 01-21-2016, 09:51 AM.

                        Comment


                          #13
                          Patrick,

                          We (MTPredictor) do a good deal of complex and advanced analysis and in the process of doing so, we maintain an in-memory repository of the analysis across all running instances of the software as well as the relationships between the various elements that comprise it in order to create relationships between them and custom drawing elements, shapes, etc. In addition, in order to persist this on application shutdown, we actually serialize it to disk so that it can be deserialized and loaded when the application is opened.

                          Without getting into too much detail as to why we do it this way, it will suffice to state that trying to save the contents of what we do to native NinjaTrader indicator properties for serialization is neither adequate nor appropriate, since this functionality is part of a shared framework we use across multiple platforms.

                          In the process of saving our analysis cache files to disk, we use the Chart Form unique ID to be able to relate the cache file to an instrument and timeframe within a specific chart window when the indicator loads and loads the cached analysis from disk. And, in NT7 everything works perfectly.

                          However, in NT8, we run into problems due to the fact that it is entirely possible to have multiple tabs in the same chart with the same instrument and time frame, with no unique or immutable way to distinguish between them - for example, some type of unique ID on the tab.

                          So, I tried to work around this myself by generating and storing unique identifiers as indicator properties and attempting to ensure their uniqueness at certain points during the indicator lifecycle myself so we could handle multiple tabs.

                          Although this worked in some scenarios, it completely fell apart in others, such as when using chart templates and indicator presets, because it saves the properties and restores them and thus they are no longer unique. I tried to get around this, but it seems that the presets and templates are applied later in the lifecycle, and so the end result is that we wind up with instances with duplicate identifiers.

                          Right now, this is a major roadblock in us getting stable version of the product for NT8, and besides this issue, it is fairly close.

                          What we need to be able to do is to uniquely identify both the Chart Form and the Chart Tab that an instance of the indicator is running in, so simply having a similar unique ID on the tab should work. What's more, is that you should even be able to persist this if the tab is moved to a new window, or regenerate it in the event it is duplicated.

                          Comment


                            #14
                            sdonahue,

                            Thank you all for your comments. We are looking into implementing this.

                            Comment


                              #15
                              Thanks Patrick.

                              When you have a tracking number, can you please let me know, as this is a real "show stopper" for us.

                              Thanks for all your help on this

                              Steve Griffiths

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Irukandji, Yesterday, 02:53 AM
                              2 responses
                              17 views
                              0 likes
                              Last Post Irukandji  
                              Started by adeelshahzad, Today, 03:54 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post adeelshahzad  
                              Started by CortexZenUSA, Today, 12:53 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post CortexZenUSA  
                              Started by CortexZenUSA, Today, 12:46 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by usazencortex, Today, 12:43 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post usazencortex  
                              Working...
                              X