Tradingview Alert Connector
  • Overview
  • What is Tradingview Strategy
  • Setup
    • Run on local PC
    • Run on cloud service
    • Test Tradingview strategy alert
    • Set Tradingview strategy alert
    • How to get dYdX v3 Credentials
    • GMX Setup
    • dYdX v4 Setup
    • Bluefin Setup
    • Add Sentry.io monitoring
    • FAQ
  • Additional Usage
    • Execute order from non-strategy alert
    • Run DCA bot
Powered by GitBook
On this page
  1. Setup

Set Tradingview strategy alert

PreviousTest Tradingview strategy alertNextHow to get dYdX v3 Credentials

Last updated 11 months ago

  1. Go to the following website and generate an alert message

On this website, users can build easily using the following step.

Input each parameter on the left side and click “GENERATE” button. Then on the right side copy generated JSON by clicking “Copy to clipboard”

We recommend setting a small order size to test your strategy and the bot's behavior.

2. At The Tradingview website, choose Market and strategy you want to use. show that strategy on your chart.

3. At “Strategy Tester” tab, Click the alert button

4. At Create alert popup, Set “Webhook URL” and “Message” and click “Create”

  • Webhook URL: your endpoint URL to receive alerts

  • Message: paste generated JSON which created at Step1

Other fields are optional to set.

That's it! Please wait until your strategy alert is triggered and execute an order

"reverse" parameter

If you set "reverse" parameter to true in the alert message, this tool doubles order size from your second order so that position on dYdX is matched to Tradingview's one. Please give a different strategy name in "strategy" parameter to each strategy.

Each strategy data is stored as a JSON file in /data/strategies folder.

You can reset to the initial state by deleting this JSON file (or modifying in JSON file)

rm -rf ./data/strategies/[mainnet | testent]

Order History CSV

Order history data is stored in /data/exports folder in CSV format.

You can transfer that CSV file by scp command

Alert message JSON format

Key
Value
Description

exchange

dydx | perpetual | gmx | dydxv4 | bluefin

If you don't set this parameter, exchange is regarded as "dydx v3" to be compatible with older version.

strategy

any string to distinct each strategy

please avoid containing "/"

market

market to trade.

Must be XXX_USD format(ex. BTC_USD)

size

Number of order size(amount) or {{strategy.order.contracts}}

ex. 0.1 for 0.1 BTC order. Can be also set to "{{strategy.order.contracts}}" if you want to retreive size from strategy parameter.

sizeUsd

Number of order size in USD

Required field for GMX.

sizeByLeverage

Number

optional field when you want to specify size by leverage. ex. 0.1 for 10% of your collateral balance.

reverse

true or false

Set true if this strategy takes opposite position on each trade and always has long or short position

order

{{strategy.order.action}} or "buy" | "sell"

Use {{strategy.order.action}} if order direction is specified on TradingView strategy

position

{{strategy.market_position}} or "long" | "short" | "flat"

price

{{strategy.order.price}}

passphrase

any string

optional but recommended to enhance security

Please specify only one of the size, sizeUsd or sizeByLeverage field.

Reference:

https://alert-message-generator.vercel.app/
JSON formatted alert message
Disks for Persistent File Storage | RenderDisks for Persistent File Storage | Render
Strategy Alerts — TradingViewTradingView
Logo
executed order automatically to dYdX
executed order automatically to Perpetual Protocol
Logo