Convert TradingView strategy to Algo rule

I want to know whether it is possible to convert TradingView strategy to an Algo rule for automated trading.
If yes, can someone share a workflow for the same?

Strategy involves multiple timeframes and couple of indicators along with price action.
Can this achieved with any of the algo platforms? If yes, kindly name some.

PS: Pls consider me a noob.

:pray:

Yes you can but instead of a strategy, create an indicator for the same code and put an alertcondition. Now you can capture that alert and run a webhook. This feature is only available on TradingView Premium and above. Well I would suggest a better alternative i.e. subscribe to data apis from Dhan, Fyers etc, convert the strategy to your own coding langauage and run it from your local.

1 Like

:+1: i shall study and get it tested!

If I am not asking too much, could you shed some light on it? Or point me where to look for more info?

Thanks a ton! :pray:

To get your hands dirty, go through the Algo series from Dhan on their Youtube here.

If you are a programmer then you will be able to write your own code after going through the videos. Use ChatGPT to convert the strategy to code in your preferred language, mention what APIs you are going to use and it will give you a good skeleton. You will need to run through it and fix some pieces before it does trading. For starters, do not execute the order api. Just write to a file where you are going to enter and exit along with the P&L. This is you simulating the paper trading. You can then analyse these for atleast a month so that you keep on enhancing the algo that you have written. Once you have validated everything then you can run an actual trade but for the next 2-3 months, keep a disciplined Stop Loss(1), Target(3), max trade per day, max trade per week, no expiry day trades and max loss amount per week.

1 Like

Thank You So Much GIF

1 Like

I did convert all my tradingview indictors into python strategy. I am using pynecore library GitHub - PyneSys/pynecore: PyneCore - Pine Script Like Python Framework. My workflow is simple. First i will convert tradingview into python code using pynecore. Then cross verify with actual tv charts, then back test and then implement in live trading. There are several other ways but i prefer this metord as i feel this is very simple. and nearest replica to tv charts. Other options can using standard indictor development in python use TA-lib etc or even pineTS - GitHub - alaa-eddine/PineTS: PineTS is a lightweight, open-source TypeScript framework that recreates key Pine Script™ features and syntax in JavaScript. It enables developers to write, port, and experiment with PineScript-like indicators outside of TradingView’s environment..

1 Like

@khulsat

U can directly link your strategy alerts to place orders on Dhan via webbooks. Every time the strategy generates an order a corresponding order will be fired in Dhan provided you configure your scripts and JSON strings appropriately.

1 Like

Comedy Central Thank You GIF by Lights Out with David Spade

1 Like