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

Re: Ela help on weekly data



PureBytes Links

Trading Reference Links

At 7:53 AM -0500 2/22/99, Jose Pascual wrote:

>May I ask from those Omega ELA expert if how can I code the following?
>
>I need the first trading day of the week open and the last trading day of
>the week close then divide it by 2 and then show it ONLY every last trading
>day of the week in a daily bar chart.
>
>Any one of the following scenario will happen:
>Monday open + Wednesday close divide by 2 or
>Tuesday open + Friday close divide by 2 or
>Tuesday open + Thursday close divide by 2
>
>When I tried to code it in daily bar as in (open+close)/2 then plot it in
>subgraph 2 with weekly data on it it works fine BUT when their is irregular
>last trading day that does not fall on Friday it then would miss to plot it
>on that particular week.  But on the next week with regular trading days as
>in from Monday to Friday it then plots again correctly.
>
>Hope anyone who likes to help me can email me privately as not to disturb
>the group.



This should work but it has to wait until the next Monday to figure it.

Bob Fulks

----

Vars: DoW(0), Signal(0), MondayOpen(0);

DoW = DayOfWeek(Date);

if DoW < Dow[1] then begin      {This finds first trading day of week}
   Signal = (MondayOpen + Close[1]) / 2;
   Plot1[1](Signal, "Signal");  {Plot back in time one bar}
   MondayOpen = Open;
end;