Skip to main content

execution, slippage, and order types in algo automation

Understand slippage in automated trading — how it happens, why TradingView doesn't show it, and how to minimize it with limit orders and timing.

Written by Brad
Updated over 2 weeks ago

summary: market orders fill immediately at market price — you're guaranteed execution but not price. limit orders fill at your price or better, but might not fill at all. understanding the tradeoffs, execution latency, and how backtesting differs from live trading helps you choose the right order type for your strategy.

when you create a strategy in edgeful, you choose how your entry orders execute — as market orders or limit orders. each has different tradeoffs. slippage (the gap between expected and actual execution price) hurts in fast markets and can push losses past your max-loss limits. this guide covers how execution works, what happens when orders don't fill, and how to reduce slippage in live trading.

what slippage is

slippage is the difference between your expected execution price and the actual price you get. it's almost always negative on exits and can range from a few ticks to significant loss in volatile markets.

entry slippage: you expected to enter at 100.50 but got 100.55. positive slippage improves your trade; negative slippage makes it worse.

exit slippage: you set a stop-loss at 99.00 but filled at 98.75. this is almost always negative — you lose more than planned.

slippage gets worse in low-liquidity periods and during volatility spikes.

market orders vs limit orders

market orders

a market order fills immediately at whatever the current price is when the order reaches your broker. you're guaranteed to get filled — but you're not guaranteed the exact price.

advantage: certainty. when your TradingView alert fires, the trade goes in. you won't miss the setup because of price movement.

tradeoff: slippage — the difference between the price when the alert fired and the price your order actually filled at. in fast-moving conditions, that gap can be meaningful.

limit orders

a limit order fills at your specified price or better. if price never reaches your limit level, the order doesn't fill.

advantage: price control. you won't get a worse fill than the level you set — which can eliminate most entry slippage.

tradeoff: you might not get filled at all if price moves through your level quickly without triggering.

how the execution chain works

there's a chain between your TradingView alert firing and your broker receiving and executing the order. price can move during that chain, especially at fast-moving times like the open or around news events.

latency chain: TradingView alert → edgeful processing → broker execution. average execution time from when edgeful receives the alert is 300ms.

two things contribute to slippage along this chain:

  • latency — price moves while the order is in transit, especially during fast market conditions.

  • liquidity conditions — even with fast execution, if the market is moving quickly and the order book is thin, a market order will fill across multiple price levels.

what happens when a limit order doesn't fill

if your limit order is open and price doesn't fill it, the order stays open. it won't cancel automatically — it sits until one of the following happens: the stop loss or take profit level is hit, or the end-of-day close-out triggers. at that point, the unfilled order is cancelled.

this means there's a window where you have an open order sitting in your broker with no position — be aware of this, especially if you're monitoring intraday.

TP and SL are always market orders

regardless of which order type you choose for entries, your take profit and stop loss orders are always executed as market orders. the entry order type only affects how your entry fills — not how your exits fill.

this is worth knowing if you're trying to reduce slippage overall. switching to a limit entry helps with the entry price, but your exits will still fill at market.

backtesting vs live execution

here's something that catches a lot of users off guard — TradingView's Strategy Tester doesn't simulate missed fills.

in backtesting: every limit order enters perfectly. the Strategy Tester assumes all orders fill at your target price — which isn't true in live trading. this makes backtests with limit entries look better than live trading will actually be. that 6-month backtest might show 80 trades; live execution might deliver 60.

in live trading: limit orders might not fill if the market doesn't reach your exact price. price might tick just above or below your limit, leaving you with no trade at all.

impact: your live win rate and profit might be lower than backtest results because some trades simply don't execute.

common execution issues

limit order rejection — TP hits before entry fills

your ORB algo has a limit order entry and a take-profit (TP) exit. but here's the trap: price breaks above the opening range. your limit order entry is set at ORB high (e.g., 100.50). your TP is set at 100.75. market gaps up and hits 100.75 — your TP level — before your limit order fills at 100.50.

result: no trade executes. no position means no TP/stop to manage. the system rejects the order because it arrived after the TP already triggered.

fix: use market orders for entry instead of limit orders. this ensures you get filled. alternatively, adjust your limit order level closer to the breakout so it fills before your TP.

adapting your algo for real-world conditions

use market orders on breakouts: if you absolutely need the trade, enter at market. you sacrifice a few ticks for certainty.

widen limit order levels: set your limit entry a few ticks away from the exact breakout level to increase fill odds.

tighten TP levels: move TP1 closer to entry so it's less likely to trigger before your entry fills.

add contingency delays: some trading systems let you add a brief delay before TP activation — gives your entry order time to fill first.

how to reduce slippage

  • use limit orders for entries — control the max price you'll pay.

  • trade during high liquidity periods — more buyers/sellers means tighter fills.

  • paper trade 2–3 weeks before going live — compare paper results to backtest. large discrepancies (lower win rate, fewer trades) reveal limit order fill issues. adjust your settings based on paper trading results, not backtest results alone.

  • compare your TradingView signals against your broker's actual fills to see the real slippage — TradingView's trade logs don't display execution slippage.

which order type should you use?

there's no universal right answer — it depends on your priorities.

if fill certainty matters most — you want to make sure every alert that fires results in a position — market orders are the better fit.

if entry price precision matters most — you'd rather skip a trade than take a worse entry — limit orders give you more control. just be aware of the no-fill risk and the duplicate order risk if alerts fire in quick succession.

most users start with market orders and switch to limit orders if slippage becomes a consistent problem on their specific setup. both are valid — test each on SIM before committing to one on a live account.

related articles

Did this answer your question?