Code Execution Slippage

Following was the backtest report in 5 min Periodicity:
Corresponding 5 Min Chart : 2

But when I did the live trading on candle completion the order placed was different from the backtest prices as the prices are moved so as my profits are reduced. The following is 1 Min chart3

So I did some calculation at the candle completion price of amibroker and LTP. I found that there is slippage of around 72 points.

Please suggest some solution to cover this slippage. I had gone through various KBs present in the sites. This is a sample situation.

In live trading, I faced a similar situation where the order is triggered at candle completion and the prices are moved from there. How to tackle this ??

Hi Dhiaj use below code. Then you will always have price with slippage.

1 Like