sclass PullbackToProfit { settable double pullback; settable double profit; settable long startTime; settable long timestamp; settable bool isShort; double cleanness() { ret profit() <= 0 ? 0 : profit()/pullback(); } toString { var duration = formatMinutes(timestamp()-startTime()); ret shortenNumbers(2, concat((isShort ? "Short" : "Long") + " with callback ", pullback(), "% yields ", profit(), "% profit in ", duration, " (cleanness ", formatDouble1(cleanness()), ")")); } bool replaces(PullbackToProfit ptp) { ret pullback() <= ptp.pullback() && profit() >= ptp.profit(); } }