Today I had a position get stopped out, that was entered via a long only strategy. On that strategy, I have contigent trailing stop and profit target orders.
Upon getting stopped out, I had 5 contracts exit at market with a trigger price. Since it was on the IB paper trader, and there isn't much market depth obviously sent via the API, I had the market order fill at 2 cents below where the market actually was at that moment. I know in real market conditions that order would have filled very close to where the actual trailing stop was (its a very deep market ... natural gas).
Anyway, not only did the order stop out, but then for some reason an additional sell order entered. And the sell was a quantity of 1, whereas my defaultquantity is 5. Furthermore, I have no shortentry orders in my system. The order that appeared to trigger was from an ExitLong at Market command in my script, but appeared as 1S on my orders page!
Here's the order history for the entry, the stoploss and the erroneous short entry:
NG 06-07 Buy 1 8.019 5/17/2007 9:32 NG 06-07/0001f4e5.444e159c.01.01 Entry 5L 1.37E+09 LongHammer 2.74
NG 06-07 Sell 1 8.037 5/17/2007 9:46 NG 06-07/0001f4e5.444e176b.01.01 Exit 4L 1.37E+09 Trail stop 2.74
NG 06-07 Sell 1 8.013 5/17/2007 9:46 NG 06-07/0001f4e5.444e176c.01.01 Exit 3L 1.37E+09 Trail stop 2.74
NG 06-07 Sell 1 8.013 5/17/2007 9:46 NG 06-07/0001f4e5.444e176d.01.01 Exit 2L 1.37E+09 Trail stop 2.74
NG 06-07 Sell 1 8.013 5/17/2007 9:46 NG 06-07/0001f4e5.444e176e.01.01 Exit 1L 1.37E+09 Trail stop 2.74
NG 06-07 Sell 1 8.013 5/17/2007 9:46 NG 06-07/0001f4e5.444e1770.01.01 Exit - 1.37E+09 Trail stop 2.74
NG 06-07 Sell 1 8.038 5/17/2007 9:46 NG 06-07/0001f4e5.444e1771.01.01 Entry 1S 1.37E+09 Boll Violate 2.74
If you see it shows an 1 exit at market, and then 4 others much lower.
The last record sells an extra! Not only that, but notice it marks BollViolate as an entry, not an exit, which the strategy actually is !!!
An ideas?
By the appearance of this, you would conceive i have a short system in this strategy. but i don't. the trigger 'bollviolate' is a LongExit order, and was triggered at that same bar as the trailing stop.
This seems to be one of those situations where possibly two exit strategies coincide perfectly in timing (the same bar), and somehow only one contract got thru.
How to deal with this?
Comment