Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Building GenAI Applications. 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. Building GenAI Applications. 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

What’s New in the Latest OpenAlgo Version?

The latest release of OpenAlgo introduces a series of powerful features and improvements designed to enhance both the user experience and backend robustness. Whether...
Rajandran R
2 min read

Simple Option Straddle Dashboard – Tradingview Pinescript v5

In this blog post, we’ll walk through creating a Simple Option Straddle Dashboard using TradingView’s Pine Script v5. This dashboard will dynamically calculate the...
Rajandran R
3 min read

Resolving SSL: CERTIFICATE_VERIFY_FAILED in OpenAlgo (Windows)

If you’ve encountered the SSL: CERTIFICATE_VERIFY_FAILED error while using OpenAlgo on Windows, there’s good news. A user from the OpenAlgo community has shared a...
Rajandran R
1 min read

Leave a Reply

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