Custom Criteria Optimization
If the standard set of optimization parameters does not suit you, you can create your own custom criteria for optimization.
There are two ways to create custom criteria for optimization:
- Create a custom signal using the SetCustomFitnessValue keyword in the PowerLanguage Editor specifying your custom criteria.
One possible solution would be to create a function which calculates Sharpe Ratio in PowerLanguage (see default SharpeRatio function) and use it as a SetCustomFitnessValue keyword parameter. Such signal should be applied to your chart with the signals that you want to optimize before performing optimization.Make sure that you select the Custom Fitness Value from the Optimize by dropdown list in the Optimization Settings window (see Performing Optimization).