Difference between revisions of "SetCustomFitnessValue"

From MultiCharts
Jump to navigation Jump to search
m
Line 9: Line 9:
 
* This function can be used only in signals
 
* This function can be used only in signals
 
* To use the custom fitness value:  
 
* To use the custom fitness value:  
*# Open genetic algorithm properties window;
+
*# Open Genetic Algorithm Properties window;
 
*# Set the number of simulations by changing the inputs range;
 
*# Set the number of simulations by changing the inputs range;
 
*# Select the '''Algorithm-Specified Properties''' tab
 
*# Select the '''Algorithm-Specified Properties''' tab

Revision as of 15:08, 16 May 2012

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 Genetic Algorithm Properties window;
    2. Set the number of simulations by changing the inputs range;
    3. Select the Algorithm-Specified Properties tab
    4. Select the Custom Fitness Value from the list under the Standard Criteria 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));