Skip to content

AccountType

Summary

Returns current account type

Signature

1
public enum AccountType

Namespace

cAlgo.API.Internals

Fields

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the AccountType
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public 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)
         {
         }
     }
 }

See Also


Last update: December 7, 2022

Comments