Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AccountName

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

    AccountName

    So, I have the below codes in one of my custom indicators, but it seems that NT8.1.1.3 does not recognize the new nomenclature for AccountName "DEMOxxxxxx", consequently, my custom indicator is not working under NT8.1.1.3. Please, how is AccountName referenced in the new NT8 ?

    lock (Account.All)
    myAccount = Account.All.FirstOrDefault(a => a.Name == AccountName);​


    omololu

    #2
    Hello omololu,

    How are you getting the AccountName input, is that a manually typed in value or are you using an account selector?

    Are you also connected to the connection with that demo account when the code is being run?

    To get a better idea of what's happening it may be helpful to loop over the accounts collection and print out the names of the accounts that are available to check if there is some error with the input property.

    Code:
    foreach(Account acc in Account.All)
    {
        Print(acc.Name);
    }

    Comment


      #3
      Originally posted by omololu View Post
      So, I have the below codes in one of my custom indicators, but it seems that NT8.1.1.3 does not recognize the new nomenclature for AccountName "DEMOxxxxxx", consequently, my custom indicator is not working under NT8.1.1.3. Please, how is AccountName referenced in the new NT8 ?

      lock (Account.All)
      myAccount = Account.All.FirstOrDefault(a => a.Name == AccountName);​
      Nothing has changed.

      In order for your code to work, AccountName must be a string and must be defined
      somewhere else in your code.

      Where is that string defined?
      Is that string a public property?
      What is the value of that string?

      Emily's suggestion to print all Account names is good place to start.

      Is the string value already known? Such as "DEMOxxxxx"?

      You'll want to make sure the "DEMOxxxxx" account is defined in
      your system -- thus Emily's suggestion to print them all.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      64 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      94 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      51 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      108 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      63 views
      0 likes
      Last Post PaulMohn  
      Working...
      X