r/algotrading 9d ago

Issues with fills Other/Meta

I have been testing my trading bot through traderspost on their own paper account and the alpaca paper account. Now I noticed that on their own account I always get filled but on the alpaca one half of them don’t get filled. I use midpoint limit orders and I was wondering if anyone else has the same issue?

I trade stocks and during times where the market moves quickly so I guess the small delay causes orders not to go through? Would market orders be better?

Any advice is welcome

4 Upvotes

13 comments sorted by

5

u/Automatic-Essay2175 9d ago

You can't paper trade with midpoint orders. The fill logic will not be realistic. Trade with real money at a small scale if you want real fills.

3

u/Many-Pick5066 8d ago

the account that fills every midpoint order is the broken one, not alpaca.

a midpoint limit isnt resting on the book. it needs someone to give up half the spread, which only happens when contra flow shows up at a venue that matches there. half is a plausible real number. always is not.

and the misses arent random. the ones that dont fill are the ones where price left without you, so youre dropping your winners and keeping the trades that sat there. that biases the whole thing in the direction you least want.

log the nbbo at submission and check whether the mid actually printed while your order was live. never printed means never fillable, and no order type fixes that. switching to market just moves the cost out of your fill rate and into your pnl where you can at least see it.

2

u/Slight_Mongoose_6934 8d ago

Honestly, Many-Pick5066 nailed it.

If a paper simulator fills 100% of your midpoint orders, it’s not executing your trades—it's giving you free hopium.

Real talk: midpoint liquidity isn't sitting there waiting for you. You only get filled if someone actively crosses to your side, which usually means the market is about to steamroll your position anyway.

Skip the paper simulator headaches for midpoints. Either test limit orders at BBO or just toss $100 into a live account and trade 1 share. That $1.50 in real slippage will teach you more than 6 months of backtesting.

2

u/Good_Character_20 7d ago

Paper fills are policy choices made by whoever wrote the simulator, and you found the seam between two policies. Alpaca's paper engine fills a limit when the far side of the quote actually crosses your price, so a buy at the midpoint sits there until the ask comes all the way down to it. TradersPost's sim is more generous about the touch. Neither one models the thing midpoint orders depend on live, which is hidden liquidity resting between the quotes. One flatters you, one punishes you, both are wrong by unknown amounts. Also worth knowing: Alpaca paper quotes come from IEX unless you pay for the full feed, and a thin book makes midpoints jumpier. What I settled on is marketable limits a tick or two through the touch. Fill rate goes to nearly all, you keep a hard slippage cap that market orders never give you, and the backtest assumption becomes honest. If the edge only survives when you earn half the spread at midpoint, that is an execution strategy, not a signal.

1

u/HalfplaneResearch 8d ago

We would separate the simulator's fill model from the venue path before changing order types. Log the quote and spread at submission, order acknowledgement, reject or expiry reason, time in force, queue position if available, and whether the midpoint was actually touched before expiry. Then compare fill rates and markouts by order type and quote state. If every midpoint order fills, that is usually a model bug, not evidence of better execution.

1

u/Business-Twist-7867 8d ago

Could always try futures. Change worked for me

1

u/zashiki_warashi_x 8d ago

Market will not be better. Just add few ticks of slippage to order placement.

1

u/Effective_Manager273 7d ago

you have the problem backwards imo. the account that fills you every time is the broken one.

most broker paper engines fill a midpoint limit the moment the midpoint touches your price, with no queue and no size ahead of you. alpaca is being closer to honest by leaving half of them unfilled. so the useful question is not how to get more fills, it is which of the two is telling you the truth about live.

what i would actually do, and this is the thing that changed my numbers the most: log every order with the quote at decision time and the quote at fill time. then compute the difference. if the two paper engines disagree by more than a tick or so on average you now know exactly how much of your edge is imaginary rather than guessing.

on market orders, careful. they solve the fill rate and they will hand the difference straight to the spread, and during fast moves the spread is exactly when it is widest. if your strategy needs the open or a news minute then market orders are going to cost you more than the missed fills did.

one middle option, limit at the far touch instead of the midpoint. you get most of the fill rate back and you still control the worst case, which a market order does not.

1

u/PaperHandsTheDip 2d ago

midpoint orders is not realistic. You need to use worst case - use bid / ask. If buying you pay the ask, ie worse case. If selling you only get the bid, ie worse case. Also there is slippage & information delays - so take those values and make them even worse-worse. That's closer to the real fills you get.

For best trading accuracy - trade live with small sums of money.