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

how can I access a unique identifier for a chart

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

  • NinjaTrader_Jesse
    replied
    Hello,

    I am not aware of an id system in place already for the charts that would be easily accessible, but wouldn't a ID input work in the indicator/strategy?

    For example, add a user defined input for an int, add the item to a chart and assign an ID.

    That would be saved with the Chart individually when you save your workspace, so chart A could have an id and Chart B could have a totally different ID although it is the same indicator or strategy.

    You could then use that ID for whatever other work you are having the script do in which that is needed to identify a specific chart.

    I look forward to being of further assistance .

    Leave a comment:


  • tulanch
    started a topic how can I access a unique identifier for a chart

    how can I access a unique identifier for a chart

    I have a programmatic need to identify a chart. I have used Bars.Instrument.FullName
    which worked fine for a previous need. But now I may have charts that have the identical instrument and chart type so this is no longer unique.

    Is there some identifier that is persistent for a chart, always the same even if I stop and restart NT. I would think there is some internal chart ID number based on it's creation order in the workspace.

    Any suggestion on datatype I could poke around in for such an id or suggestion on how to accomplish the same thing. It needs to be persistent and uniquely the same on restart.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Tim-c, Today, 03:54 AM
0 responses
3 views
0 likes
Last Post Tim-c
by Tim-c
 
Started by FrancisMorro, Today, 03:24 AM
0 responses
3 views
0 likes
Last Post FrancisMorro  
Started by Segwin, 05-07-2018, 02:15 PM
10 responses
1,772 views
0 likes
Last Post Leafcutter  
Started by Rapine Heihei, 04-23-2024, 07:51 PM
2 responses
31 views
0 likes
Last Post Max238
by Max238
 
Started by Shansen, 08-30-2019, 10:18 PM
24 responses
945 views
0 likes
Last Post spwizard  
Working...
X