GetFitnessArgs.MaxEquityDrawdownPercentages
property · GetFitnessArgs · cAlgo.API
DesktopCLICloud
Gets the maximum amount of equity drawdown in percentage (ex: 40%). It can return a positive value between 0-100.
Definition
double MaxEquityDrawdownPercentages {get;}
getFitnessArgs.MaxEquityDrawdownPercentages: float
Returns double
Examples
protected override double GetFitness(GetFitnessArgs args)
{
return args.MaxEquityDrawdownPercentages > 20 ? 0 : args.NetProfit;
}
def get_fitness(self, args):
return 0 if args.MaxEquityDrawdownPercentages > 20 else args.NetProfit