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

R: Painting Previous bars



PureBytes Links

Trading Reference Links

Thanks Gary.

The code solves my trouble.

Massimiliano

-----Messaggio originale-----
Da: Gary Fritz [mailto:fritz@xxxxxxxx]
Inviato: venerdì 11 ottobre 2002 15.50
A: Scorpio Massimiliano
Cc: omega-list@xxxxxxxxxx
Oggetto: Re: Painting Previous bars


> I ve got this code:
> 
> If DayofWeek(Date)=5 then begin
> PlotPaintBar(High,Low,"MyDate");
> end;
> 
> I wonder how to paint not only the single day (Friday in this case),
> but all the bars of the week (since Monday to the same Friday). 

Which week?  DayOfWeek(Date) = 5 is true on EVERY Friday.  If you 
painted all the Mon-Fri for every week it's true, you'd paint 
every single day on the chart.

Are you trying to paint the week before a specific Friday?  If 
so, you might try something like this:  (not tested)

MyFriday = (whatever);
MyFriJD = DateToJulian(MyFriday);
DateJD = DateToJulian(Date);
if DateJD <= MyFriJD and DateJD+4 >= MyFriJD then
  PlotPaintBar(High,Low,"MyWeek");

Gary


"Nota di riservatezza: Il presente messaggio, corredato dei relativi
allegati contiene informazioni da considerarsi strettamente riservate, ed è
destinato esclusivamente al destinatario sopra indicato, il quale è l'unico
autorizzato ad usarlo, copiarlo e, sotto la propria responsabilità,
diffonderlo. Chiunque ricevesse questo messaggio per errore o comunque lo
leggesse senza esserne legittimato è avvertito che trattenerlo, copiarlo,
divulgarlo, distribuirlo a persone diverse dal destinatario è severamente
proibito, ed è pregato di rinviarlo immediatamente al mittente distruggendo
l'originale"

"Confidentiality Notice: This message, together with its annexes, contains
information to be deemed strictly confidential and is destined only to the
addressee (s) identified above who only may use, copy and, under his/their
responsibility , further disseminate it. If anyone received this message by
mistake or reads it without entitlement is forewarned that keeping, copying,
disseminating or distributing this message to persons other than the
addressee (s) is strictly forbidden and is asked to transmit it immediately
to the sender and to erase the original message received."