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

Re: EL Codes



PureBytes Links

Trading Reference Links

At 8:15 PM -0800 1/15/98, Phil wrote:

>  I have two questions about how to write two different EL codes.
>    1.  Below is a code that will paint bars from 10/12/97 to 15/12/97.
>The code works fine.  What I would like to know is how to change or rewrite
>the codes to paint the bars from say Dec. 10th through Dec. 15th for every
>year!  Example--- If I have a chart open going back say 5 years, how would I
>write the code to paint the bars Dec. 10th through Dec. 15th in every year
>and also when Dec 1998, 1999 etc. comes in the future?
>
>Input:StDate(971012), Eddate(971512);
>IF Date >= StDate and Date <= EdDate then
> begin
>  plot1(Low,"Low");
>  plot2(high,"high");
> end;

You could say:

  if Month(Date) = 12 and DayOfMonth(Date) >= 10 and
      DayOfMonth(Date) <= 15 then ...



>
>    2.  If I think the market I am following has a say 50 day cycle how
>would I write a showme to place row of dots under the price bar every 50
>days on my charts?  I would want it like the above code, to show the cycles
>in the past and as the future comes.  I would also want it to be ploted for
>five or more days not just the one 50th cycle day.  Also how can it be
>ploted different distances under the price bar?   I know I am not very good
>at explaining what I need, but maybe most will understand what I want to do!
>Any information would be very helpful!!
>

Try:

    Value1 = Mod(CurrentBar + Offset,50);
    if Value1 >= 0 and Value1 <= 5 then Plot1(L - Distance, "Cycle");

where "Offset" adjusts the position in the 50 day cycle and "Distance" is
the distance under the low where you want to plot.

Bob Fulks

--
Bob Fulks
bfulks@xxxxxxxxxxxx