Skip to content

IAccount.StopOutLevel

property · IAccount · cAlgo.API.Internals

DesktopCLICloud

Stop Out level is a lowest allowed Margin Level for account. If Margin Level is less than Stop Out, position will be closed sequentially until Margin Level is greater than Stop Out.

Definition

double StopOutLevel {get;}
api.Account.StopOutLevel: float

Returns double

Examples

if (Account.MarginLevel.HasValue && Account.MarginLevel.Value < Account.StopOutLevel * 2)
    Print("Margin level {0}% is close to the stop out level {1}%", Account.MarginLevel.Value, Account.StopOutLevel);
if api.Account.MarginLevel is not None and api.Account.MarginLevel < api.Account.StopOutLevel * 2:
    api.Print(f"Margin level {api.Account.MarginLevel}% is close to the stop out level {api.Account.StopOutLevel}%")