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

Re: Forex referenceing prior days OHLC-code help needed.



PureBytes Links

Trading Reference Links

Hi Gary and Steve,

Sorry about being so late with a reply - my router bit the dust - my
home system was not set up with the idea of getting my main computer
back on line as fast as possible.  I should have a cat5 cable long
enough to directly connect that computer to the modem but I don't - not
yet.  

Gary - You are, of course, correct - with 'date' TS does not look at the
computer date.  In my hast, I've had Steve's problem, to provide Steve
with a solution to the problem I was not technicaly correct in my
explanation.

As you pointed out the time stamp on the data is what is important.  It
appears - I say appears because I not been able to verify with Omega or
anyone else - that Forex data is stored with a GMT time stamp.  A couple
of experiments that I've done seem to say that this is true - of course
the display of the data can can be changed however one would like to
change it.  But the storage of the data seems to be GMT.  With one
exception that I've found - TenFore data.  It seems that TenFore is time
stamping their data one hr before GMT - seems to match up with their
Paris office.

With the data being stored with a GMT time stamp the question with Forex
becomes when is today today?
Let me illustrate - I happen to be EST time which makes me 6 hrs off
from GMT - at 6:01 PM EST it is 00:01 GMT my "today" is now GMT
tomorrow.  My "today" data stops at 6:00 PM EST.

Dealing with just one day back - Steve is trying to use a function that
uses yesterdays data - when is yesterday?  At 6:00 PM EST my "today"
data becomes yesterdays data for the function.  

By changing the computer clock to GMT and displaying the data without an
offset from GMT the question of when is today today disappears. 
Everything works just as it should.  I find it very much less confusing
to work in GMT time rather then trying to figure out what it is that I'm
asking TS to do and exactly what TS is going to do with a time/date
based command. 

We run many commands that TS needs to do based on "today" and on time
based on 00:00:00 - yes I'm aware that TS does not work in seconds
however a DLL called "machinetime" gets by this limitation of TS and
will allow you work with TS based on seconds - with tick charts on forex
the delay in TS looking at the next tick and a clock based on seconds
only happens occasionally.

Larry


Gary Fritz wrote:
> 
> > It looks like the function uses "date" and "date[x]" which is
> > causing TS to look at the computer date - so if you set your computer
> > time to GMT it should work right.
> 
> Date does NOT reference your computer date -- that's CurrentDate.  Date
> refers to the date associated with the current bar.  It's unaffected by
> your computer time setting unless your data vendor uses your computer's
> time to timestamp data.  But even in that case Date still refers to the
> time that was STORED with that bar.  Changing the computer date has no
> effect on it.
> 
> Gary