Skip to content

GetFitnessArgs.Swaps

property · GetFitnessArgs · cAlgo.API

DesktopCLICloud

Gets the swaps of all trades in account deposit currency.

Definition

double Swaps {get;}
getFitnessArgs.Swaps: float

Returns double

Examples

protected override double GetFitness(GetFitnessArgs args)
{
    return Math.Abs(args.Swaps) > 100 ? 0 : args.NetProfit;
}
def get_fitness(self, args):
    return 0 if abs(args.Swaps) > 100 else args.NetProfit