you can use writeval(vLastBar,1) to write as a normal number string
also better to use vLastDate = LastValue(Datenum()); than array signifier
vLastBar = LastValue(BarIndex());
vDate = DateNum();
vLastDate = LastValue(Datenum());
vCurrDate = Now(3);
_TRACE("| LastBar " + writeval(vLastBar,1) + " | LastDate " +
writeval(vLastDate,1) + " |
CurrDate " + writeval(vCurrDate),1);
--
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com
On 17/04/2008, Graham Johnson <[EMAIL PROTECTED]> wrote:
> I'm wanting to get the date of the last bar and compare it with current
> date - the code below returns {EMPTY} for vLastDate and 1.08042e+006
> for vCurrDate.
>
> vLastBar = LastValue(BarIndex());
> vDate = DateNum();
> vLastDate = vDate[vLastBar];
> vCurrDate = Now(3);
> _TRACE("| LastBar " + vLastBar + " | LastDate " + vLastDate + " |
> CurrDate " + vCurrDate);
>
> Any suggestions, please.
>
> Graham