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

Re: More single precision



PureBytes Links

Trading Reference Links

Yup. Here's an example of a hashnums workaround that I use
to send data to an ascii file so that it is both chart-readible offline
and accessible realtime.
The code is specific to contracts with expiration months of 3,6,9,and 12.

dbs

...HashDate function... is used to convert the date to a y2k
chart readable format. Hashnums cannot read the ELDateString
format because it begins with an integer. Hashnums cannot
read strings that begin with numbers. At the same time,
EL cannot pass 8 digit numbers without error. The Hashdate
function is the solution whereby numbers(not mixed with letters)
are passed as strings...

vars:
ipmonth(0),ipday(0),ipyear(0);


{ZZZZZZZZZZ...make chart-readable date conversion...ZZZZZZZZZZZ}

ipyear=year(d)+1900;
ipmonth=intportion(month(intportion(date)));
ipday=intportion(dayofmonth(intportion(date)));

if dayofmonth(date)>9 and month(date)>9 then
hashdate= numtostr(ipyear,0) + numtostr(ipmonth,0) +numtostr(ipday,0);

if dayofmonth(date)>9 and month(date)<10 then
hashdate= numtostr(ipyear,0) + "0" + numtostr(ipmonth,0) +
numtostr(ipday,0);

if dayofmonth(date)<10 and month(date)<10 then
hashdate= numtostr(ipyear,0) + "0" + numtostr(ipmonth,0) + "0"
+numtostr(ipday,0);

if dayofmonth(date)<10 and month(date)>9 then
hashdate= numtostr(ipyear,0) + numtostr(ipmonth,0) + "0" +
numtostr(ipday,0);


{ZZZZZZZZZZZ...end chart-readable date conversion...ZZZZZZZZZZZ}

Dennis Holverstott wrote:

> > Well duh,
> > I though that by omega using YYYMMDD they were, in a
> > way, admitting they could not handle 8 digit dates.
>
> Yep. To paraphrase the ads we are bombarded with on CNBC, they are using
> "revolutionary new" 1970s technology. Can't even add 2 numbers together
> and get the right answer. Pffffffft.
>
> --
>   Dennis