In this example we step through the process of optimizing the OMX_Sample1 strategy. This is a simple moving average crossover strategy. The code for it is shown here:
inputs:
Len1( 15 ),
Len2( 20 );
ifAverageFC( c, Len1 ) crosses overAverageFC( c, Len2 ) then
buy next bar at market ;
ifAverageFC( c, Len1 ) crosses underAverageFC( c, Len2 ) then