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

Accessing exposed Dictionary from an indicator

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

    Accessing exposed Dictionary from an indicator

    I have a public Dictionary<int,string> in one indicator that I am accessing from another.
    The problem is the only values I can access externally are the ones that were first declared in OnStartUp(). Values added in OnBarUpdate() are not visible from outside.

    Is there a way to "refresh" the dictionary after every addition (OnBarUpdate)?

    #2
    Hello gregid,

    Using Dictionaries is not supported by NinjaTrader Support, however, this thread will remain open for the community to offer any assistance.

    (You may want to try adding Update(); in the get { } for the public property.)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello gregid,

      Using Dictionaries is not supported by NinjaTrader Support, however, this thread will remain open for the community to offer any assistance.

      (You may want to try adding Update(); in the get { } for the public property.)
      Thank you! Adding Update() gives me exactly what I need.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by maybeimnotrader, Yesterday, 05:46 PM
      3 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by adeelshahzad, Today, 03:54 AM
      5 responses
      32 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by stafe, 04-15-2024, 08:34 PM
      7 responses
      32 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by merzo, 06-25-2023, 02:19 AM
      10 responses
      823 views
      1 like
      Last Post NinjaTrader_ChristopherJ  
      Started by frankthearm, Today, 09:08 AM
      5 responses
      24 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X