【AverageFC2】
[code]Inputs: Price ( numericseries ) ,Length ( numericseries ) ; { this input is assumed to be constant }
Vars: Sum( 0 ) ;
If Currentbar = 1 then
Begin
For Value1 = 0 to Length - 1
begin
Sum = Sum + Price[Value1] ;
end ;
End
Else
Sum = Sum[1] + Price - Price[Length] ;
if Length <> 0 then
AverageFC2 = Sum / Length
else
AverageFC2 = 0 ;
[/code]
页:
[1]