[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EL documintation of the average function



PureBytes Links

Trading Reference Links

I have a question that may have been asked in the past, and as the topic has
come up I'd like to know if some light can be shed on this.

The notes with this average function identifies it as Average. The second one is
identified as @Average, The function wizard seems to identify the @Average
function, but pastes in Average. If I type in Average or @Average what do I get,
and what is the difference, in the two.

{ *******************************************************************

 Study  : Average
 
 Last Edit : 7/7/95

 Provided By : Omega Research, Inc. (c) Copyright 1995

********************************************************************}
inputs: Price(NumericSeries), Length(NumericSimple) ;
vars  : Sum(0), Counter(0) ;

Sum = 0;
for counter = 0 to Length - 1 
begin
 Sum = Sum + Price[counter];
end;

if Length > 0 then 
 Average = Sum / Length
else
 Average = 0;





{ *******************************************************************

 Study  : Average
 
 Last Edit : 7/7/95

 Provided By : Omega Research, Inc. (c) Copyright 1995

********************************************************************}
inputs: Price(NumericSeries), Length(NumericSimple) ;
vars  : Sum(0), Counter(0) ;

if currentbar = 1 
then begin
 Sum = 0;
 for counter = 0 to Length - 1 
 begin
  Sum = Sum + Price[counter];
 end;
end
else
 Sum = Sum[1] + Price - Price[Length];
if Length > 0 then 
 Average = Sum / Length
else
 Average = 0;



"The darkest hour in any man's life is when he sits down to plan
 how to get money without earning it"

Sentinel Trading
rjbiii@xxxxxxxxx