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

Re: Time Compared to Time[1] Problem



PureBytes Links

Trading Reference Links

DN> TM = Time;
DN> If TM<>TM[1] then Print(Time, "New Bar");
.  .  .
DN> Clearly, I'm missing some understanding about the way
DN> that TS2000 handles time. Can someone enlighten me on
DN> what's causing this unexpected behaviour?

I  want to express my thanks to those who offered advice and
solutions  both  on  and  off  the list. Your advice did the
trick.

It's  now  clear  to  me  that I was using the bar based [1]
which  was coming from a 1 tick chart, *but* being used on a
1  minute  chart. I should have known better, but as many of
you pointed out, the [1] is keying off of the 1 minute bars,
not the 1 tick bars.

Thank  you for everyone who took the time to clearly explain
that--you've  saved  me  many  hours  of  anguish,  and I do
appreciate that.

For   anyone   who's  curious,  I'm  using  Robert  Linder's
PushPOP.dll  to  combine the tick based data with the longer
time  based  chart  that  I'm  referring  to above. So, on a
longer  timeframe,  I'm using the tick data to set a flag in
the  bar,  and  after  new  bar  starts,  I'm using the time
comparison to clear that flag.

The  solution,  as  suggested by Robert, is to Push the TIME
from  the  tick  data  to the Global Array, then compare the
last  value  (POPLAST)  in  the array with the current time.
That  gets  me around the Time<>Time[1] which is always TRUE
on a chart of 1 minute or greater.

--
Dave Nadeau
Fort Collins, CO