Custom Criteria Optimization: Difference between revisions
From MultiCharts
no edit summary
No edit summary |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
If the standard set of optimization parameters | 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: | There are two ways to create custom criteria for optimization: | ||
#Write | #Write '''Custom Criteria''' in JavaScript. In the '''Optimization Settings''' window choose Optimize by: Maximal or Minimal '''Custom Criteria'''. Then click the '''Edit''' button; or: | ||
#Create a custom signal using the [[SetCustomFitnessValue]] keyword in the PowerLanguage Editor specifying your custom criteria. | #Create a custom signal using the [[SetCustomFitnessValue]] keyword in the PowerLanguage Editor specifying your custom criteria. | ||
<p> | <p> | ||
<div style="background-color: #E5F6FF;">Example: You want to optimize your signal by Sharpe Ratio. This parameter is not among the standard criteria. | <div style="background-color: #E5F6FF;">Example: You want to optimize your signal by Sharpe Ratio. This parameter is not among the standard criteria. | ||
One possible solution would be to create a function which calculates Sharpe Ratio in | 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 | Make sure that you select the '''Custom Fitness Value''' from the '''Optimize by''' dropdown list in the '''Optimization Settings''' window (see [[Performing Optimization]]).</div> | ||
</div> | |||
<div style="background-color: #E3FBE5;">Note: '''!optimize by sharpe ratio!''' default signal can be used as an example showing how to utilize this functionality and how to find the best parameters using custom criteria.</div> | <div style="background-color: #E3FBE5;">Note: '''!optimize by sharpe ratio!''' default signal can be used as an example showing how to utilize this functionality and how to find the best parameters using custom criteria.</div> | ||
[[Category: | [[Category:Optimization]] |