• 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, 03: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, 04: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 danitralla, Yesterday, 03:33 AM
                1 response
                18 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Started by ninjo, Yesterday, 11:54 AM
                0 responses
                6 views
                0 likes
                Last Post ninjo
                by ninjo
                 
                Started by deblanka, Yesterday, 08:56 AM
                0 responses
                13 views
                0 likes
                Last Post deblanka  
                Started by Boonfly8, 03-22-2019, 12:30 PM
                7 responses
                24 views
                0 likes
                Last Post sledge
                by sledge
                 
                Started by Sohal, Yesterday, 05:02 AM
                2 responses
                19 views
                0 likes
                Last Post techmint  
                Working...
                X