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

Account Selector reloading account after save

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

    Account Selector reloading account after save

    I have this code

    Code:
    XElement accountElement = rootControlsElement.Element("account");
    ​accountSelector.DesiredAccount = accountElement.Value;
    ​
    in my protected override void Restore(XElement element) function, when I reload the workspace only tradovates accounts get loaded, not Rithmic account, how to solve this issue

    this is my save function:
    Code:
    rootControlsElement.Add(new XElement("account", (lastAccount != null ? lastAccount.Name : "Sim101")));
    ​

    #2
    Hello Pole123,

    One way to check this would be to add a print into the save method to confirm if a value is actually being saved when you save the workspace. That would probably be the best first step at addressing where the problem is. If a value is not being saved that will answer the question on why its not loading, if a value is being saved but then not loaded we would likely need more specific details on the use case and a simple test script so that we can test and report that.

    JesseNinjaTrader Customer Service

    Comment


      #3
      I have tested th print with 2 account

      updated on reload: APEX-117503-01 (Rithmic)

      updated on reload: APEX290100000167 (Tradovate)

      second account shows correctly on tab and account selector, first account won't load into the selector

      Comment


        #4
        Hello Pole123,

        To clarify were you able to see the account names when printing them during the save event? We don't need to know about the load process at this point just if the account names are seen when you save.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by anton_tymoshchuk, Yesterday, 01:14 AM
        5 responses
        33 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Angus7, Today, 04:43 AM
        0 responses
        8 views
        0 likes
        Last Post Angus7
        by Angus7
         
        Started by Thomas79, 01-23-2014, 10:14 AM
        10 responses
        1,511 views
        0 likes
        Last Post martin70  
        Started by istinethomas, Today, 03:31 AM
        0 responses
        7 views
        0 likes
        Last Post istinethomas  
        Started by joselube001, 05-10-2024, 12:17 PM
        7 responses
        51 views
        0 likes
        Last Post esatino
        by esatino
         
        Working...
        X