TradingView (simple alerts)
The quick and easy way to get running. Bonney will execute buy and sell according to your Strategy. Works with any Strategy.
Set up simple alerts
Open your alert in Bonney
In Bonney, open your strategy’s TradingView alert — the wizard’s last page, or the strategy’s card afterwards. Keep it open: it holds the Webhook URL and the Alert body.
Open the chart
In TradingView, open a chart of the market this strategy trades in Bonney, and add your strategy to it.
Set the order size
Set your strategy’s order size in coins of that market — Bonney trades the size TradingView fills.
Create the alert
Create an alert. For Condition, choose your strategy. If a second menu appears — it does when the script calls alert() — choose Order fills only.
Paste the message
In Message, delete what is there and paste Bonney’s Alert body.
Add the webhook
Under Notifications, turn on Webhook URL and paste Bonney’s Webhook URL.
Check the expiration
Alerts expire after a while — on TradingView’s highest-end plans you can choose Open-ended in Expiration. Otherwise, renew the alert before it expires.
Create
Tap Create. From your strategy’s next fill, Bonney trades on Hyperliquid and reports each trade in Telegram.
TradingView (deep integration)
Make use of Bonney’s advanced capabilities. STOP, REDUCE, and limit orders. Requires access to your Strategy’s pine script.
Set up deep integration
Find your two values
In Bonney, open your strategy’s TradingView alert and look at its Alert body. You need two values from it: strategy_id and secret.
Paste the helper
In TradingView, open your strategy in the Pine Editor. Paste this right below its strategy(…) line, then replace YOUR_STRATEGY_ID and YOUR_SECRET with your two values.
BONNEY_ID = "YOUR_STRATEGY_ID" BONNEY_SECRET = "YOUR_SECRET" bonney(string command, float size = 0.0, float limit = 0.0) => string head = '{"strategy_id":"' + BONNEY_ID + '","command":"' + command + '"' string sizes = ',"size":' + str.tostring(size, "0.########") + ',"position":' + str.tostring(strategy.position_size, "0.########") string prices = ',"limit_price":' + str.tostring(limit, "0.########") + ',"reference_price":' + str.tostring(close, "0.########") string tail = ',"timestamp":' + str.tostring(timenow, "0") + ',"secret":"' + BONNEY_SECRET + '"}' string msg = head + sizes + prices + tail alert(msg, alert.freq_once_per_bar_close) msgSend your orders
Call bonney() wherever your strategy places an order — beside its strategy.entry, strategy.exit or strategy.close:
bonney("long", 0.1) // open or add to a long bonney("short", 0.1) // open or add to a short bonney("reduce", 0.05) // shrink the position, never past zero bonney("stop") // close the whole position at market bonney("long", 0.1, 60000) // a limit order at 60000Sizes are in coins. A third number places a limit order at that price; without it, the order is at market. Call it on the bar your strategy places the order, once per bar.
Save the script
Save the script and keep it private — it now holds your secret.
Open the chart
Add the strategy to a chart of the market it trades in Bonney.
Create the alert
Create an alert. For Condition, choose your strategy, then alert() function calls only. Leave Message as it is — each call sends its own.
Add the webhook
Under Notifications, turn on Webhook URL and paste the Webhook URL from the same page in Bonney.
Check the expiration
Alerts expire after a while — on TradingView’s highest-end plans you can choose Open-ended in Expiration. Otherwise, renew the alert before it expires.
Create
Tap Create. From your script’s next call, Bonney trades on Hyperliquid and reports each trade in Telegram.