What is Slippage?
Slippage is a situation on the market when a trader obtains a different price on the executed order compared to what he expected before the order execution. The primary reasons slippage occurs during algorithmic trading can be related to several factors:
Bid/Ask spread changes during market execution
Delay between the trading signal and the exchange execution
High market volatility
Delay in response from the exchange API
Why Is It Important to Account for Slippage?
Slippage, which is always present in algo-trading, is a crucial parameter to consider when backtesting your strategy — especially if you are trading on lower timeframes such as 1, 3, or 5 minutes and scalping for small gains. Including slippage in your backtesting will provide more realistic results and more accurate expectations for live trading.
How to Estimate Slippage
The size of slippage will vary depending on the market asset, its bid-ask spread, and its volatility. To construct an accurate backtest, a trader should run a small sample of live trades (on a specific asset) and then compare the execution price to the original backtest results for the same period. Calculating the difference between live and backtested prices will give you an accurate average slippage figure, which can be input into your backtest.
How to Adjust Slippage in TradingView
When you add your strategy to the chart, go to the strategy settings and switch to the "Properties" tab.

