Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

tabname

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

    tabname

    Is there a way to resolve the TabName from within a script.
    When I try to print it I just get "@INSTRUMENT_FULL"
    What I want is the "@INSTRUMENT_FULL" to get resolved to "ES 09-16" which is same as shown on the tab itself.

    Thanks

    #2
    Hello dtl-saw,

    Thanks for your post.

    I'm not sure what you are trying to do but you can get the instrument full name via: Instrument.FullName

    Reference: http://ninjatrader.com/support/helpG...t_fullname.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I didn't ask you about instrument names.
      What I'm asking you about is "how do I resolve the TabName" in a script.
      What I'm trying to do is to write data from different charts in my workspace. What I'd like to do is use the tabname to identify what chart the data came from. So, 1 of my charts might have a unique tabname like "Chart1 @INSTRUMENT_FULL" and another chart might have a unique tabname like "Chart2 @INSTRUMENT_FULL". Both charts have the same script that write specific data pertinent from each chart. I think it would be nice to be able to identify the chart that the data came from by including the chart tabname as part of the file name. To do that I need to be able to resolve the chart tabname as a string in the script.
      When I try chartControl.Properties.TabName it resolves to the string "Chart1 @INSTRUMENT_FULL" but what I would like is to get "Chart1 ES 09-16"
      Is that possible? If so, how would I resolve it?

      Thanks
      Last edited by dtl-saw; 08-12-2016, 07:08 PM. Reason: typo

      Comment


        #4
        For your immediate need, cut off @INSTRUMENT_FULL with a string function, and use what NT_Paul suggested.

        But it might be a minor bug or something not yet completed if your are getting @INSTRUMENT_FULL.

        Comment


          #5
          Hello dtl-saw,

          Thanks for your posts.

          I have replicated your results and will be investigating further. I will update this thread when I have further information.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Hello dtl-saw,

            Thanks for your patience.

            Here is an example you can use: Print ("Chart Tab name: "+ ChartControl.ChartTab.ActualTabName);
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              This breaks my indi

              Error message is:
              Error on calling 'OnStateChange' method: The calling thread cannot access this object because a different thread owns it.

              Comment


                #8
                Hello dtl-saw,

                Please post the segment of code you are using along with what section of the code (Onstatechange? OnBarUpdate?)

                Alternatively, feel free to send in to PlatformSupport[at]NinjaTrader[dot]Com Atten: Paul and a link to this thread.
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by love2code2trade, 04-17-2024, 01:45 PM
                4 responses
                31 views
                0 likes
                Last Post love2code2trade  
                Started by cls71, Today, 04:45 AM
                2 responses
                10 views
                0 likes
                Last Post eDanny
                by eDanny
                 
                Started by proptrade13, Today, 11:06 AM
                0 responses
                2 views
                0 likes
                Last Post proptrade13  
                Started by kulwinder73, Today, 10:31 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by RookieTrader, Today, 09:37 AM
                3 responses
                15 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X