• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

something like chart id?

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

    something like chart id?

    this topic was not helpful - https://ninjatrader.com/support/foru...ad.php?t=36165

    so, I want to know Is here any way to get and ID (or any temporary identifier) for current open Chart id?

    (from two indicators I try to find out if they are both attached to same chart)
    Last edited by TazoTodua; 03-12-2018, 02:14 PM.

    #2
    I've found that `this.ChartControl.Handle.ToInt32()` returns something ID, is that what i am looking for?

    Comment


      #3
      Hello TazoTodua,

      You could generate an ID and save this to the ChartControl.Tag and find it this way.

      Code:
      if (ChartControl != null)
      {
      	ChartControl.Dispatcher.InvokeAsync(() =>
      	{
      		ChartControl.Tag = Guid.NewGuid();
      		Print(ChartControl.Tag);
      	});
      }
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        I dont want to modify any property of chartcontrol (I'm trying to avoid extra hard-coding and invoking). I just want to detect any identifier using existing properties ...
        Can you please tell me if my previous reply was correct method too? (i mean using: ChartControl.Handle.ToInt32() )

        thanks as always!
        Last edited by TazoTodua; 03-12-2018, 03:00 PM.

        Comment


          #5
          Hello TazoTodua,

          I'm not aware of the ChartControl having a handle property.

          Are you able to use this on your end?
          Is the generated integer unique?

          I'm not aware of any documented or undocumented properties (or methods) that uniquely identify each chart control.

          I am happy to submit a feature request on your behalf for the NinjaTrader Development to consider adding an unique ID property of ChartControl in a future version of NinjaTrader if you would like.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by TazoTodua View Post
            I dont want to modify any property of chartcontrol (I'm trying to avoid extra hard-coding and invoking). I just want to detect any identifier using existing properties ...
            Can you please tell me if my previous reply was correct method too? (i mean using: ChartControl.Handle.ToInt32() )

            thanks as always!
            You can always query the chart itself to know all the indicators that are loaded on the chart. Of course, in NT7, that means that you probably need to code it into the indicator in the first place.

            Comment


              #7
              Originally posted by TazoTodua View Post
              I dont want to modify any property of chartcontrol (I'm trying to avoid extra hard-coding and invoking). I just want to detect any identifier using existing properties ...
              Can you please tell me if my previous reply was correct method too? (i mean using: ChartControl.Handle.ToInt32() )

              thanks as always!
              I found an old post that I made many years ago on how to do that which I explained in an earlier reply, on how we can get the Indicators that are loaded on a chart..

              ref: https://ninjatrader.com/support/foru...81&postcount=1

              Comment


                #8
                KOGANAM ! YOU ARE AWESOME AS ALWAYS !!!! thank you so much for your help!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by pstrusi, Today, 03:11 PM
                0 responses
                12 views
                0 likes
                Last Post pstrusi
                by pstrusi
                 
                Started by godric, Today, 01:29 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Jim  
                Started by blar58, Today, 02:06 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_JoshG  
                Started by woodyfox, Yesterday, 08:06 AM
                3 responses
                17 views
                0 likes
                Last Post NinjaTrader_PatrickH  
                Started by julifro, Today, 11:58 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Working...
                X