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

Re: entry on current bar



PureBytes Links

Trading Reference Links

So let's say you have a sytem that generates a signal when a pivot is crossed.
Obvioulsy these pivots are generated from the previous day data, right?
If that is the case then and more than likely it is, the " buy next bar" is see in my code ( the bar which execuction, stops ...etc are taken at) is actually the current bar I see when I run the system on this day, right?

On the other hand if you are running a system that generates signals based on the actual trading days data then one needs to run on intraday bars otherwise the stop or limit order gets executed the following day, right?

Pablo

On Sun, 12 Feb 2006 08:41:13 -0800, DH <catapult@xxxxxxxxxxxxxxxxxx> wrote:

Will backtesting reflect this accurately?
Yes with some caveats.

Close and market orders are always correct.

Stop and limit orders will be correct if there is only one order active
on the bar.

If there are two orders active, say a profit target and a stop loss, and
both prices got touched during the bar, TS can't know which one actually
got filled first if the only data you have is the OHLC of the bar. It
will make assumptions that may or may not be right.

If you have historical tick data, newer versions can look inside the bar
and know which happened first. Being old school, I tend not to trust
that and would prefer to use shorter bars so it's very unlikely that two
orders would get elected on the same bar. Same goes for the new
intra-bar calcs Bob mentioned. It's sort of a black box that you can't
really monitor to make sure it's working right. TS has a history of
undocumented bugs, ummm errr, features in its black box operations. :-)