Cond1=Ref(C,0);
Cond2=Ref(O,0);
TimeFrameRestore();
Cond3=C>TimeFrameExpand(Cond1,inDaily);
Plot(Cond3,"",43,4,512);
(By the way, I initially tried Ref(c,-1) to reference
yesterdays close but for some reason, the formula then looked at the close 2
days ago).
So lo and behold - this thing seems to be working!!
I can observe the closing price from the day before and then I see that
when the current day's 1 minute bar closes above that, I get a signal.
However...
My data is such that at the end of the trading day, the last
bar is sometimes given at 4:01 p.m., sometimes at 4:03 p.m., sometimes they even
go on until 4:08 p.m. The formula I have created, however, seems to be assuming
that the price at 3:59:00 p.m. is the closing price, because sometimes, if
the 4:00:00 bar closes higher than the 3:59:00 bar, my indicator often goes
off. Even if this doesn't happen, I can see that the signals I
am getting are related to the yesterdays 3:59:00 bar and not the very last bar
in yesterdays data. The price from 3:59:00 is the one that is the formula is
saying is the 'close'. Now, sometimes the 3:59:00 price is close enough to the
actual final bar of the day that this doesn't make much difference, but
sometimes it isn't. This is the first problem I am having.
The second is this - Right now, the software seems to
be rounding off to the nearest whole number when determining the closing price.
I have figured this out by drawing a horizontal line through the closing price
at the 'last' bar of the day before (actually the 3:59:00 bar!!) and then seeing
EXACTLY when the trigger is given the next day, if of course one is given.
Any help is appreciated.
Nik