Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetAccountValue

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

    GetAccountValue

    as yet there is no documentation on using GetAccountValue

    I get a compile error "The name GetAccountValue does not exist in current context"

    please provide syntax/context details

    thanks

    #2
    public double GetAccountValue(Cbi.AccountItem accountItem)

    .... here are the supported enum values

    public enum AccountItem
    {
    /// <summary>
    /// Buying power.
    /// (= remaining buying power).
    /// </summary>
    BuyingPower = 0,
    /// <summary>
    /// Total cash value of account.
    /// </summary>
    CashValue = 1,
    //// <summary>
    /// Realized profit / loss on account.
    /// </summary>
    RealizedProfitLoss = 9,
    }

    Comment


      #3
      thanks Dierk

      need more detail please....e.g. printing cash value of Sim101 account

      Comment


        #4
        point is Dierk, I can not get your code to compile so I am using it wrong of missing something

        Comment


          #5
          Please try this:
          Code:
          Print(GetAccountValue(AccountItem.CashValue));
          Note: This method will return zero (0) on historical bars.

          Comment


            #6
            Thanks Dierk

            Compiles and runs fine

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            601 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            347 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            559 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            558 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X