PureBytes Links
Trading Reference Links
|
This is not some binary code. This is Jan 1, 2000 expressed in
EasyLanguage. If you don't write EL code, ignore this message.
Condition "Date=1000104" will be true soon but "Date=20000104"
will never -- just in case you didn't already know this Y2K issue
at EL programming level. OR's Y2K compliance does not imply that
your EL code are all Y2K trouble free. You have one week to get
ready.
Why not the more intuitive 20000101, you are left wondering.
Apply this indicator to a chart and look at the result in PE's
Debug tab:
value1=20000101; if LastBarOnChart then Print(value1:10:2);
You will see "20000100.00" printed. Where is your 1 at the end
gone? The only logical conclusion is that 20000101 is too large
an integer to be accurately represented in EL.
By the same token, you can not write a function that takes a
parameter "timestamp" and pass integer Date*10000+Time to it; it
is not going to work!
By the same token, conditions like "Close=Close[1]" are
absolutely safe but conditions like "Close=value0" might (in rare
cases, especially the price scale is small like 1/100000) fail to
give you the expected result.
If you really want to know why, look at SDK documentation that
comes with your SP3/4 CD. Prices like Close is represented by
integer type but variables are represented by float type.
The last question to ask for those who are math kind is, what
then is the largest integer that can be represented in EL without
losing accuracy? You can answer this question yourself via
experimentation with EL. I did it in C before on 32 bit floats
and the magic number turned out to be 16777217 - I don't know the
answer (for EL).
|