【RS_Extremes】
[code]inputs:NumDays( numericsimple ),
DataArray[ Twelve, MaxNumDays ]( numericarray ),
Index( numericsimple ),
oPrevHighest( numericref ),
oPrevHighestDay( numericref ),
oPrevLowest( numericref ),
oPrevLowestDay( numericref ) ;
variables:
var0( 0 ) ;
oPrevHighest = 0 ;
oPrevLowest = 1000000 ;
var0 = MaxNumDays + 1 ;
for Value1 = 1 to NumDays
begin
Value2 = Mod( Index + Value1, var0 ) ;
condition1 = DataArray[ 2, Value2 ] > oPrevHighest ;
if condition1 then
begin
oPrevHighest = DataArray[ 2, Value2 ] ;
oPrevHighestDay = Value1 ;
end ;
condition1 = DataArray[ 3, Value2 ] < oPrevLowest ;
if condition1 then
begin
oPrevLowest = DataArray[ 3, Value2 ] ;
oPrevLowestDay = Value1 ;
end ;
end ;
RS_Extremes = 1 ;
[/code]
页:
[1]