Set Tradingview strategy alert
Last updated
Last updated
Go to the following website and generate an alert message
https://alert-message-generator.vercel.app/
On this website, users can build JSON formatted alert message 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
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)
Order history data is stored in /data/exports folder in CSV format.
You can transfer that CSV file by scp command
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: