Skip to content

AccountType

enum cAlgo.API.Internals

DesktopCLICloud

Returns current account type

Definition

public enum AccountType

Namespace: cAlgo.API.Internals · Group: Account

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the AccountType
    public partial class AccountTypeSample : Indicator
    {
        protected override void Initialize()
        {
            var text = string.Format("Account Type: {0}", Account.AccountType);

            Chart.DrawStaticText("text", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Chart.DrawStaticText("text", f"Account Type: {api.Account.AccountType}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Values

Name Value Description
Hedged 0 Account type that allows hedged positions
Netted 1 Account type that allows only single net position per symbol

See also