Profit during test but loss on live trade with same data

I made an algo, and traded with that algo on kite connect, getting data from kite ticker, along with algo, had a separate thread for putting tick values in DB to test other algo with the data, it's intraday algo, but when tested with same data by querying DB and sending to on ticks function I got a profit, I tried this for 34 stocks same result, loss on live market and profit on query from DB.
Why would that be happening. Any thoughts would be appreciated.
  • Imran
    I have also faced the same problem.. in my case slippage was the main cause.
    crosscheck your backtesting trades with real trades on zerodha.
  • Balakrishna
    Couple of reasons which cause losses in live trading
    1. Slippage .. can be on both entry and exit
    2. Invalid tick data from zerodha .. in live market sometimes zerodha gives invalid tick data which would be stabilized after 10 ,20 seconds. So u have to wait and get confirmation to buy or sell
  • Nayan924
    Yes, so i found that it is slippage, i place order on current price but order is placed on price higher than current for buy and on lower price for sell.
    Is this problem for everyone or is it just zerodha and changing broker might solve it?
  • matrix
    matrix edited May 2019
    I suppose you're sending market orders. Perhaps try sending Limit orders with your preferred price, and see how it pans out.
Sign In or Register to comment.