PureBytes Links
Trading Reference Links
|
Hello Alex,
Because your 3-minute ES bars fail to resolve price-by-price
bid/ask tick liquidity.
Once you got filled at 983.50, you're probably attempting to generate
a sell order on 985.50 which never came close to getting taken out.
Perhaps only three 1-contract trades took place at 985.50, hammering out your
high on the bar, but there may have been 400 contracts and 30 people sitting on the
Offer at 985.50 at that moment in time. The CME supposably processes orders first-come-first served.
Perhaps you were somewhere in the middle of the line, but would never
get filled unless sufficient people were hitting the Offer, thereby
likely moving the price up higher.
Saturday, August 9, 2003, 7:56:28 PM, you wrote:
AM> In backtesting a daytrading strategy I'm developing, it sometimes
AM> works and sometimes doesn't, for no reason I can see.
AM> What I do when a signal condition is met, is place three orders for
AM> the next bar:
AM> 1. Limit order to enter the market
AM> 2. Limit order to take profit (ExitLong or ExitShort)
AM> 3. Stop order to exit (ExitLong or ExitShort at stop)
AM> Either of the exits may occur on the same bar that the entry occurs,
AM> provided the entry order is filled.
AM> This actually works. Sometimes. I see bars where the strategy
AM> correctly enters the market and then exits on the same bar, at the
AM> correct price.
AM> I have calculations that set the order price, and if it's nonzero
AM> in the case of a buy or sell condition, then the following code is
AM> executed:
AM> For buying:
AM> if orderprice > 0 then begin
AM> buy("B") qty contracts next bar at orderprice limit;
AM> ExitLong("LX0") next bar at orderprice-initstop stop;
AM> ExitLong("LP0") next bar at orderprice+targetprofit limit;
AM> end;
AM> For selling:
AM> if orderprice > 0 then begin
AM> sell("S") qty contracts next bar at orderprice limit;
AM> ExitShort("SX0") next bar at orderprice+initstop stop;
AM> ExitShort("SP0") next bar at orderprice-targetprofit limit;
AM> end;
AM> Targetprofit and initstop are 2 points. I see a case where a sell
AM> order is filled and profit taken on the same bar. OK, fine, I know
AM> that works.
AM> Then I see a case where a buy order is filled at 983.50 but the high
AM> of the bar at 2 points profit, 985.50 does not result in a fill of
AM> the limit order to exit at 985.50. Instead, it stops out at a loss
AM> on the following bar.
AM> Anybody have any idea why a limit order wouldn't get filled, if the
AM> price data stream contains a price (in this case the bar high) at the
AM> exact price of the limit order?
AM> If it matters, I'm using 3-minute bars on ES made from ES tick data.
|