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 tradingnasdaqprueba, 04-09-2024, 09:52 AM
        6 responses
        26 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by PaulMohn, Today, 02:06 AM
        1 response
        2 views
        0 likes
        Last Post PaulMohn  
        Started by Mindset, Today, 01:27 AM
        0 responses
        4 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by EB Worx, 03-07-2023, 05:05 AM
        4 responses
        97 views
        1 like
        Last Post cls71
        by cls71
         
        Started by patricia70, 11-23-2020, 10:17 AM
        17 responses
        548 views
        1 like
        Last Post PaulMohn  
        Working...
        X