Set Tradingview strategy alert
- 1.Go to the following website and generate an alert message
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

executed order automatically to dYdX

executed order automatically to Perpetual Protocol
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 data is stored in /data/exports folder in CSV format.
You can transfer that CSV file by scp command
Key | Value | Description |
---|---|---|
exchange | dydx | perpetual | If you don't set this parameter, exchange is regarded as dydx to be compatible with older version. |
strategy | any string to distinct each strategy | please avoid containing "/" |
market | market on dYdX. | 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. |
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}} | fixed field |
position | {{strategy.market_position}} | fixed field |
price | {{strategy.order.price}} | fixed field |
passphrase | any string | optional but recommended to enhance security |
Reference: