Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Automate Your Trading with OpenAlgo and TradingView: A Step-by-Step Guide

1 min read

For traders seeking to automate their strategies, OpenAlgo and TradingView offer a powerful combination. OpenAlgo is an open-source algo-trading platform allowing seamless integration with various brokers and charting tools, including TradingView. By connecting these platforms, you can execute your TradingView strategies automatically without writing any code!

Here’s a step-by-step guide to get you started:

Prerequisites:

Step 1: Start OpenAlgo and Log In

  • Launch the OpenAlgo application.
  • Open a web browser and navigate to the OpenAlgo host URL (typically http://127.0.0.1:5000/).
  • Log in using your OpenAlgo credentials.

Step 2: Choose Your Broker

  • Upon successful login, you’ll be presented with a list of supported brokers. Select your preferred broker and complete the necessary authentication steps.

Step 3: Download Master Contract and Access TradingView Tab

  • Wait for the master contract to download successfully. This contract facilitates communication between OpenAlgo and your broker.
  • Once downloaded, navigate to the “Tradingview” tab within the OpenAlgo interface.

Step 4: Generate TradingView JSON Message

  • In the TradingView JSON Generator section, enter the OpenAlgo trading symbol for the instrument you want to trade.
  • Select the appropriate exchange and product type (e.g., MIS, CNC).
  • Click “Generate JSON” to create the message your TradingView strategy will send to OpenAlgo.
  • Copy the generated JSON message.

Step 5: Create a TradingView Alert

  • In TradingView, open the chart with the strategy you wish to automate.
  • Access the “Indicators & Strategies” menu and select your chosen strategy.
  • Click on the three dots next to the strategy name and choose “Add alert on…”.
  • Select the strategy name as the condition for the alert.
  • In the “Alert message” box, paste the JSON message you copied from OpenAlgo.
  • Optionally, you can configure the alert with a specific expiration date or choose to trigger it “Every Time” the condition is met.
  • Under “Notifications,” select “Webhook URL” and paste the TradingView Webhook URL provided by OpenAlgo. This URL directs the alert message to the OpenAlgo platform.
  • Click “Create” to finalize your alert setup.

Step 6 (Optional): Configure Trading Quantity

  • If your strategy requires a specific trade quantity, return to the “Indicators & Strategies” menu in TradingView.
  • Right-click on your strategy and choose “Properties.”
  • Adjust the “Order size” parameter to your desired quantity.
  • Click “OK” to save the changes.

That’s it! You’ve successfully connected your TradingView strategy to OpenAlgo for automated trading. Now, whenever your strategy generates a buy or sell signal, the corresponding order will be automatically placed through your chosen broker. Remember, OpenAlgo’s open-source nature empowers you to explore, modify, and customize the platform to suit your specific trading needs.

Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Integrating Tradingview Lightweight Charts with Yahoo Finance Data –…

Hey traders! If you’re looking for a way to visualize your stock data dynamically and interactively, you’re in for a treat. Today, we’ll explore...
Rajandran R
2 min read

Using Tables in TradingView Pinescript – Tutorial

Tables in TradingView Pine Script provide an effective way to organize and display data directly on the chart interface. This is especially useful for...
Rajandran R
4 min read

Voice Commands to Trade on OpenAlgo Platform Using Google…

Trading platforms are always getting better by using the newest technologies to make things easier and more efficient for users. A great example of...
Rajandran R
5 min read

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More