Well, not any individual fill could be necessarily said to be good or bad in most cases; but at the end of the day I have my net prices calculated for buys, sells and sell_shorts, and its almost always the case that avgBuyPrice>avgSellPrice but avgShortPrice < avgBuyPrice . Perhaps thats just happenstance though, because when I went long in the mornin my max inventory size so that i could both buy and sell at the same time without going short, it still came up negative pnl at the end of the day . and im still having problems with double-fills, getting filled before the cancel request arrives at the exchange, so now I gotta add in logic to wait until the order is canceled before inserting a new one. Maybe I should just try using the exchange's primary peg orders rather than trying to do it myself. This also explains it:
http://www.nasdaqtrader.com/TraderNews.aspx?id=ETU2012-11
How are Primary Peg Orders with an offset amount changing?
UPDATE:NASDAQ, BX and PSX will change the treatment of Primary Peg Orders with an Offset to be
non-displayed. This change is being postponed to allow firms more time to prepare. A new production date will be announced in the near future.
Why is this changing?
The display of Primary Pegs with an offset can potentially result in excessive messaging when multiple venues display pegged non-marketable orders. In these scenarios, it is possible for the Primary Peg orders on each venue to react to and change in relation to each other, resulting in excessive messaging and "quote flickering".
By changing the treatment of Primary Peg Orders with an Offset to be non-displayed, NASDAQ, BX and PSX will prevent this feedback loop, adding to system stability and improving market quality.
This also looks like it will help
https://www.tradersmagazine.com/am/the-iex-d-limit-proposal-its-goodbut-what-if-its-too-good/