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

Re: minutes left in bar indicator exercize



PureBytes Links

Trading Reference Links

Try this.  Create it as a ShowMe not an Indicator.  This solves the drawing
problem, but there may still be a problem in using TIME and CURRENTTIME.
TIME is bar end time.  Since I don't know easylanguage I don't know if
currenttime is referenced to the datafeed time or comes from the computer
clock time.  If the latter then the minutes left will be offset.  Another
problem may be that the ShowMe doesn't update with clock ticks but waits for
price ticks.  Maybe someone experienced with ELA can clarify the time and
current time vs GS time vs datafeed time, vs exchange time.  Its time for
bed, ;-)

{Minutes_In_Bar}
Var: ref(0);
Var: ref2(0);

ref2=Text_New(D,T,C," ");

If lastbaronchart then begin
   if value1=0 then begin
     ref=Text_New(D,T,C," "); {get id}
     value1=1;
   end;

   value2=Text_Delete(ref);

   if datacompression>1 then
      ref=Text_New(D+1,T,C, "< "+NumToStr(timetominutes(time) -
timetominutes(currenttime),0))
   else
      ref=Text_New(D,T+1,C, "< "+NumToStr(timetominutes(time) -
timetominutes(currenttime),0));

   Text_SetStyle(ref,0,2);
   Text_SetColor(ref,7);
End;

{bobr}

----- Original Message -----
From: "Bilo Selhi" <biloselhi@xxxxxxxxxxx>
To: "Omega List" <omega-list@xxxxxxxxxx>
Sent: Thursday, March 27, 2003 9:19 AM
Subject: minutes left in bar indicator exercize


> here is a handy indicator that supposed to draw a text object that
displays minutes left in the bar to the right
> of the close of the last bar on chart. for example if time frame is 10
minutes, it will count from 10 to 1
> 10,9,8....1 to the right of the close of the bar telling you how many
minutes are left in the bar.
>
> however it does not work properly and also draws not only on last bar on
chart but on all previous bars
> in real time.
>
> could someone fix this problem to make it display only on the last bar in
real time, if possible.
> can be sort of a good exercise in EL.
>
> setup:
> *** set "space to the right" to 10 bars.
> load 5 min chart in real time.
> load indicator.
> observe "<  n" to the right of the close, where n = number of minutes left
in the bar.
>
> post solution here.
>
> good trading.
> bilo.