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

Re: Duplicate Function Names



PureBytes Links

Trading Reference Links

Usually the duplicate functions are provided where there is a possible need 
for both series and simple functions.  By definition, they are not the same 
even if the code is the same.


At 02:46 AM 1/3/02 -0800, you wrote:
>I thought you couldn't have two functions with the same name, but I
>just noticed I have several Read Only functions with the same name,
>but slightly different code.
>All are Omega Research functions with the same Last Edit date.
>
>Here is a list of the duplicates
>Average
>Highest
>HighestBar
>LinearRegAngle
>LinearRegSlope
>LinearRegValue
>Lowest
>LowestBar
>Summation
>Weighted Close
>
>Here is the text of the two Highest functions to show the differences
>Although the program seems to work OK with these duplicates my question is
>Should I delete one of each of these? I don't want to give the program
>any reason to slow down or get confused.
>NS
>
>{ *******************************************************************
>
>         Study           : Highest
>
>         Last Edit       : 7/7/95
>
>         Provided By     : Omega Research, Inc. (c) Copyright 1995
>
>********************************************************************}
>Inputs : Price(NumericSeries),Length(NumericSimple);
>var    : Counter(0),MyHigh(-999999);
>
>MyHigh = -999999;
>for counter = 0 to Length - 1
>begin
>         if Price[Counter] > MyHigh then MyHigh = Price[Counter];
>end;
>
>Highest = MyHigh;
>
>
>
>
>
>{ *******************************************************************
>
>         Study           : Highest
>
>         Last Edit       : 7/7/95
>
>         Provided By     : Omega Research, Inc. (c) Copyright 1995
>
>********************************************************************}
>inputs : Price(NumericSeries),Length(NumericSimple);
>var    : Counter(0),MyHigh(-999999999),MyHighestBar(0);
>
>if CurrentBar = 1
>then begin
>         for Counter = 0 to Length - 1
>         begin
>                 if Price[Counter] > MyHigh
>                 then begin
>                         MyHigh = Price[Counter];
>                         MyHighestBar = Counter;
>                 end;
>         end;
>end
>else
>begin
>         if Price >= MyHigh
>         then begin
>                 MyHigh = Price;
>                 MyHighestBar = 0;
>         end
>         else
>         begin
>                 MyHighestBar = MyHighestBar[1] +1;
>                 if MyHighestBar >= Length
>                 then begin
>                         MyHigh = -99999999;
>                         for Counter = 0 to Length - 1
>                         begin
>                                 if Price[Counter] > MyHigh
>                                 then begin
>                                         MyHigh = Price[Counter];
>                                         MyHighestBar = Counter;
>                                 end;
>                         end;
>                 end;
>         end;
>end;
>Highest = MyHigh;

Bill Brower
Email: 1000mileman@xxxxxxxxxxxxxx
Web Site: insideedge.net