TotalMarginCalculationType
enum cAlgo.API.Internals
DesktopCLICloud
Defines types of total margin requirements per Symbol.
Definition
public enum TotalMarginCalculationType
Namespace: cAlgo.API.Internals · Group: Account
Examples
if (Account.TotalMarginCalculationType == TotalMarginCalculationType.Max)
Print("Hedged positions only use the margin of the larger side");
else
Print("Total margin calculation type: {0}", Account.TotalMarginCalculationType);
if api.Account.TotalMarginCalculationType == TotalMarginCalculationType.Max:
api.Print("Hedged positions only use the margin of the larger side")
else:
api.Print(f"Total margin calculation type: {api.Account.TotalMarginCalculationType}")
Values
| Name | Value | Description |
|---|---|---|
Sum | 0 | Total margin requirements per Symbol are equal to Sum of all margin requirements of all positions of that Symbol. |
Max | 1 | Total margin requirements per Symbol are equal to Max margin requirements from all Long and all Short Positions of that Symbol. |
Net | 2 | Total margin requirements per Symbol are equal to the difference between margin requirements of all Long and all Short Positions of that Symbol. |