Algo trading related

I have purchased an algo trading software and linked it to my Upstox account, but whenever my algo software sends a buy signal to Upstox, it always takes a late entry by 10-20 points, which turns my profitable trades into losses.