Been working on a complete backtest-to-live automation setup in Python for NSE equity using NautilusTrader + AngelOne Smart API.
I see a lot of people in the algo trading space using TradingView + webhooks as their “automation” setup — alerts firing into PineConnector or similar services, then hitting the broker API. It works to some extent but there are real limitations:
- TradingView itself cannot execute a single trade — it only sends alerts
- Every webhook chain is one more failure point between your signal and the exchange
- Free TradingView backtests on 5 min charts give you roughly 17 days of data — that is not enough to validate anything meaningful
- Backtest runs on TradingView’s own OHLC emulator, not real tick data
So I moved to Python entirely. But then ran into a different problem — most Python frameworks have separate code paths for backtesting vs live execution, which means your backtest behaviour and live behaviour silently diverge. Took a while to get true parity where the same engine processes backtest, paper trade, and live identically.
Also had to build proper Indian cost modelling from scratch — STT is different for intraday vs delivery vs options, stamp duty varies by state, and most tools just slap a flat percentage on everything which makes backtest results unreliable.
Curious what others here are doing:
- Still on TradingView + webhooks? What has your experience been?
- Moved to Python? Which framework?
- Amibroker + broker API?
- Zerodha Kite Connect with custom logic?
And has anyone dealt with the backtest-vs-live divergence problem? How did you solve it?
Suggest using openalgo at least for broker integration as they’ve already built a standardized broker-agnostic API. 
It has other features for backtesting and live deployment but I haven’t yet used it. 
Bad habit of rolling my own minimal stuff. 
Edit:
It appears openalgo is made using AI slop, so I no longer recommend it for production use or even testing on your host machine. 
2 Likes
Using my own code - python/pandas etc. Probably too much work but that works for me.
Cant completely solve it.
- Backtest data is not tick by tick accurate
- There is always some latency so we cant do exact trades. If you execute at close, It will take some time for trade to reach exchange. Also you will often be working with slightly older data - latency goes both ways.
- Slippage is a significant cost for me. Trade less often on HTF will reduce this.
- Broker issues.
I estimate costs and then multiply it (say 2x to begin with until you have data for better estimate) to get somewhat close, atleast close enough. Slippage is a higher multiple of normal execution costs for me as my target market is less liquid.
In general, expect decent degradation in live markets vs backtest, for above reasons as well as because backtest inadvertently or not has some optimizations that may not hold. Future is uncertain. I try to make sure that even 2x DD is manageable. Multiple systems help.
2 Likes
Less than 50ms 99% of the time for me using Dhan. 
1 Like
Dhan api is free or paid like zerodha?
Trading API is free but data API costs ₹500 + 18% GST unlike Z where GST is included in the price. 
1 Like
You can get data free at kaggle for stocks, btw does it provide etf, futures, options data?
1min atleast 2-3y+ data??