PureBytes Links
Trading Reference Links
|
Hi Kim -
You wrote:
> I know this is all blink of an eye stuff but, wouldn't there be more > involved?
> After checking if E1 > E2 and setting the flag accordingly, the input > record (Given record layout O, E1, E2, C), would also need to be
> reformatted in the buffer whenever E1 = Low and E2 = High. Then all > the records would be back in OHLC format which would be necessary for > existing studies to work unassisted.
As a user programming in EL, you see a virtual record (that is, you have
a mental picture of the "record" which is shaped by the operators EL
provides to access this "record"), but in fact you have no idea what the
actual internal data structure which the EL operators are accessing
looks like. The changes I suggest need not alter in any way this
"virtual record" seen by the user.
Internally (working arrays in RAM as opposed to the record as it exists
in the DAT file on disk) it would probably be better to retain O, H, L,
and C fields with a separate 1-bit flag called, let's say, "HiIsFirst"
which is set to "true" if H occurs before L and "false" otherwise. I
say this because when building a bar in real time, it would not be
neccessary to check this flag in determining if a new high or a new low
has been made. Then, each time a new high is made, the flag is simply
set to "false", and each time a new low is made, the flag is set to
"true".
The virtue of the disk-file change (E1 & E2) is that it requires NO
change to the structure of the file, only a change in how two of the
fields are interpreted by the Omega code which reads that data from the
disk and places it into the internal data structures accessed by TS and
by EL code.
You're correct, of course, about not knowing the relative order of two
signals occurring within the same bar. The whole idea of a "bar" is to
compress the data by omitting "nonsignificant" data. There will always
be some concerns which can be addressed only by reference to the data
which were thrown away in constructing a bar; it is logically
impossible to address those concerns, therefore, in a bar environment.
What I proposed (E1 & E2) makes use of a redundancy in the present
structure by replacing that redundancy with new information. (What is
the redundancy??? Answer: You don't need to see which of two fields a
value comes from to determine which is the larger of the two values.)
Regards,
Carroll S.
|