×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

SetCustomFitnessValue - MultiCharts
Open main menu

SetCustomFitnessValue

Revision as of 11:38, 3 October 2018 by Svetlana MultiCharts (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sets a value of the custom criterion that is to be used for optimization.

Usage

SetCustomFitnessValue (Criterion);

Where: (Criterion) - an expression specifying a custom criterion value.

Note

  • This function can be used only in signals
  • To use the custom fitness value:
    1. Open Optimization Settings window;
    2. Select Custom Fitness Value from the dropdown list in Optimize by: section.
  • The SetCustomFitnessValue can be used both in Genetic Optimizations and Exhaustive Optimizations.

Example

Set the gross profit to be a custom criterion for genetic optimization

SetCustomFitnessValue (GrossProfit);

Set the formula to be a custom criterion for genetic optimization

SetCustomFitnessValue (TotalTrades / (GrossLoss + GrossProfit));