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

HighY Function



PureBytes Links

Trading Reference Links

Can anyone help with some EL code?  Take a look at the HighY function
below .  Go to the phrase:

"If Year(Date) <> Year(Date[1]) Then Begin."

This begins the code by saying, "If current year is not equal to the
year of the previous bar then begin calculating the array."  I need to
change this so that it begins calculations at the year, but also at any
month or day I input.  Something like:

If Year(Date) <> Year(Date[1]) And Month(Date) > Month(Date[Date1])

with Date1 being a new input.

I suppose the calculation would end and initialize at the same month and
day next year like it currently does except at the end of the year.

I would like to apply the same code to OpenY, LowY, and CloseY.

Lest you think I am lazy and just looking someone to do my work for me,
you should know that I have tried numerous ideas and many code
variations to no avail.  I come humbly before the list out of sheer
exasperation!  Any ideas?

{*******************************************************************
Description: High of Year
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: YearAgo(Numeric);
Variables: Year1Done(0);
Array: HighArray[50](-1);

If DataCompression <= 4 Then Begin
     If Year(Date) <> Year(Date[1]) Then Begin
          Year1Done = Year1Done + 1;
      For Value1 = 50 DownTo 1 Begin
       HighArray[Value1] = HighArray[Value1-1];
  End;

HighArray[0] = High;
 End;

If Year1Done > 0 AND High > HighArray[0] Then
  HighArray[0] = High;

If YearAgo <= 50 Then
  HighY = HighArray[YearAgo];
End;

Thank you,

Bruce Campbell