| {_____OMX PREAMBLE______}
|
| OMX_EquityResolution( 100 ) ;
|
| {_____CONVERTED INPUTS__}
|
| {_____OMX PROLOG________}
|
| If BarNumber = 1 Then begin
|
| if OMX_IterationNum = 0 and ( OMX_Generation = 0 or OMX_Individual = 0 ) then begin
|
| OMX_Init = OMX_InitPass( OMX_IterationNum, OMX_Generation, OMX_Individual ) ;
|
| If OMX_Init = 1 Then begin
|
| Len1 = OMX_GetParm( "Len1" ) ;
|
| Len2 = OMX_GetParm( "Len2" ) ;
|
| If OMX_Init = 1 Then begin
|
| OMX_Temp = OMX_PriceModX( OMX_StreamNum, OMX_IterationNum, OMX_Generation, OMX_Individual ) ;
|
| If OMX_IterationNum = 0 Or OMX_DateOk Then begin
|
| {_____YOUR STRATEGY_____}
|
| if AverageFC( c, Len1 ) crosses over AverageFC( c, Len2 ) then
|
| if AverageFC( c, Len1 ) crosses under AverageFC( c, Len2 ) then
|
| sell all shares next bar at market ;
|
| {______OMX EPILOG_______}
|
| If OMX_Init = 1 And OMX_IterationNum > 0 Then begin
|
| OMX_Temp = OMX_BarInfo( OMX_EquityResolution, OMX_IterationNum ) ;
|
| If OMX_LastBarInWalk Then begin
|
| OMX_Fitness = Div( NetProfit, absvalue(MaxIDDrawDown) ) ;
|
| OMX_Temp = OMX_EndPass( OMX_Fitness, OMX_IterationNum, OMX_FirstCalcDate, OMX_FirstCalcTime ) ;
|
|