PureBytes Links
Trading Reference Links
|
At 12:19 AM 3/15/98 -0500, you wrote:
>I need help in writing the code for the following or, if such an .ela
>file is available from somewhere, I'd appreciate that information too.
>
>
>I would like to draw weekly boxes on the daily chart.
>
>The box would be bounded by monday on the left, last day of the week on
>the right, high of the week would be the top of the box and the low of
>the week would be the bottom of the box. In addition, a line across the
>midpoint of the box (H+L)/2 would be helpful.
>
>
>Thanks in advance
>
>Cyrus
Something like this ought to do it:
If DayOfWeek(Date) = 5 THEN Begin
Value1=Highest(High,5);
Value2=Lowest(Low,5);
Value3=(Value1+Value2)/2;
{begin trendlines}
Value10=TL_New(Date[4],Sess1EndTime,Value1,Date,Sess1EndTime,Value1);
Value11=TL_New(Date[4],Sess1EndTime,Value2,Date,Sess1EndTime,Value2);
Value12=TL_New(Date[4],Sess1EndTime,Value1,Date[4],Sess1EndTime,Value2);
Value13=TL_New(Date,Sess1EndTime,Value1,Date,Sess1EndTime,Value2);
Value14=TL_New(Date[4],Sess1EndTime,Value3,Date,Sess1EndTime,Value3);
End;
If you want only one box on the screen at any time, insert the following
code right under the "{begin trendlines}":
Value20=TL_Delete(Value10);
Value20=TL_Delete(Value11);
.... etc.
You can change the colors of the lines by using the TL_SetColor Statement.
Put this statement in right after you create the lines. See EL help.
Dave
|