Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 ttodua; 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 ttodua; 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 Christopher_R, Today, 12:29 AM
                0 responses
                6 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,235 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                3 views
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                7 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,415 views
                0 likes
                Last Post Traderontheroad  
                Working...
                X