@skraba, Using HA changes entry value which causes all outcome even stoploss code to change value as all takes value from entry whose value is repainting. In future try to use normal candles even for representation. I don't get why OP used HA for publishing risk management code.
@skraba, Don't get me wrong but I think OP used HA repaint to show maximum percent profitable and profit factor to others to create a perception of awesome risk management strategy. Risk management strategies has a lot to do with entries as the better the entries the more room for expansion.