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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            182 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            335 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            259 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            358 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            188 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X