Average Profitability Per Trade

Created at 23 Jan 2025, 04:32
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TH

thecaffeinatedtrader

Joined 22.07.2020

Average Profitability Per Trade
23 Jan 2025, 04:32


Hi, 

I'm interested in trying out the “custom” feature in Optimization Criteria section during back testing. It states you need to write your own “Get Fitness Method” in your cBot. 

Does anyone know how to properly write this because I've been racking my brain trying to figure this out for days now. 

I want to use a method called “Average Profitability Per Trade” or APPT.

This method measures: 

  • PW = Probability of Win
  • AW = Average Win
  • PL = Probability of Loss
  • AL = Average Loss

The formula is as follows:

APPT = (PW×AW) − (PL×AL)

Therefore, when creating this Get Fitness Method, it needs to determine the Win Percentage, Loss Percentage, Average Win Amount, Average Loss Amount, and then compute the formula to determine the best parameters to use. 

If anyone has experience in creating these Get Fitness Methods it would be GREATLY appreciated if you help me figure this out or if it's even possible to do so. 

Thanks in advance! 


@thecaffeinatedtrader
Replies

thecaffeinatedtrader
25 Jan 2025, 04:59 ( Updated at: 14 Feb 2025, 18:18 )

RE: Average Profitability Per Trade

firemyst said: 

https://help.ctrader.com/ctrader-algo/articles/for-developers/custom-fitness-functions/

 

I appreciate the response but I've already came across this video on my search to find out how to properly write the criteria I am trying to accomplish. I still don't truly understand how to get it to calculate:

  • Win Percentage
  • Loss Percentage
  • Average Dollar Amount of All Winning Trades
  • Average Dollar Amount of All Losing Trades

@thecaffeinatedtrader