When neither of the 2 signals require an order I wouldn't have active orders (I'd either cancel or not place anything, I wouldn't place orders ahead of time). So, at every new incoming Bid or Ask I'm constantly generating 2 signals, and then pass them to the signal-to-required-position translation logic., and then adjust my position only if the Ask-based signal tells me to buy or if the Bid-based signal tells me to sell (e.g. if the Bid-based signal tells me to buy additional units, and the Ask-based signal tells me to keep my position, I do nothing). If an adjustment is required, I pass the order-instructions to my execution layer with the 'cushion' parameter, to tell my execution logic to keep trying to fill this order until the price is within that cushion or cancel it. The cushion will be assigned to Ask - Bid + any additional current price deviation in my favor. How my execution layer will be filling that order is a separate issue, it might simply send a market order or use a broker's algo or use the "simple execution algo" with limit orders, but in the last case it will not go beyond the allowed cushion (if the price got worse by > cushion, it will cancel it). So let's say the range is 100$ to 110$ and the spread is 1$, until Ask becomes <= 100 or Bid >= 110 I do nothing, no orders. If Ask became 100, I issue instructions to the execution layer to buy 1 contract (assuming this signal level translates to 1 contract) with the cushion of 1$ (the current Bid-Ask spread), so assuming my execution layer uses limit-orders, it will place an optimistic-order to buy at 99(bid) and then either get filled or keep adjusting it up to 100 and then cancel it if the price keeps worsening beyond that. Or maybe I'll use a Broker's algo or maybe just a market order which should fill me at 100 barring a sudden move. So in your example, if the price is 108(assuming Bid-price, and Ask is 109) I do nothing, the deviation is too small., if it then drops to 101Bid\102Ask - I still do nothing, no active orders at all, the deviation is still too small for me. If the price drops to 99\100 I place a buy order which my algo will try to fill at 99, but up to 100., - if it's filled and the price goes up to 109\110 I do nothing, if it goes to 110\111 I place a sell order to sell at not worse than 110 or cancel (will keep that contract, wait for a better price). - If it's filled, but the price keeps dropping, then I need to think of a stop-loss order, which will again come from the bid\ask-based signals + some logic, maybe in this case I'd prefer market-orders? (or maybe use the same algo just with a larger cushion that 'guarantees' a fill).
Ok that would probably work, I guess the advantage of placing the initial bracket order is you'll effectively react quicker if the horizon is short as you won't get hammered by latency stopping you getting the orders on. Rob
Yes, I agree that a pre-placed limit order is a solid guarantee., it would require me to re-implement my whole execution-logic, though There could also be some edge-cases to think of, e.g. if the price moves too quickly (which might also cause problems for the other approach)..