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

Re: next day open DLL



PureBytes Links

Trading Reference Links

> If I write If date<>Date[1] then Todaysopen=Open of tomorrow;  {so
> i'll be able to write later . Buy at Todaysopen + N*Range stop;} I
> immediately get an error which says: " Cannot mix next bar prices
> with data streams other than data1" 

Yup.  That's one of the restrictions of looking at future bars.

But you're doing the wrong thing anyway.  "if date<>Date[1]" will 
be true on the first bar of the new day.  On that bar you want 
Open, not Open of tomorrow.  You use Open of tomorrow if you want 
to access the next day's open at the close of the PREVIOUS day.

Gary