Telegram bot

Link a chat, choose what it tells you, and the commands, including the emergency close.

Applies to the Meanward Platform connectorOpen app
On this page

The connector reports to one Telegram chat per account: your private chat with the Meanward bot, or a group you add the bot to. Every signal, order and close lands there, and the same bot takes a few commands.

  1. In the cabinet: Notifications → Link Telegram (or onboarding step Telegram).
  2. Open Telegram opens the bot with a one-time code and links your private chat when you press Start.
  3. For a group: Add to a group opens Telegram's group picker. Or add the bot to the group yourself and send the /start <code> the cabinet shows you there. The link works once.
  4. The bot answers "This chat is now linked to …". The cabinet shows Linked.

A link that's been used or is invalid gets "This link is invalid or has already been used"; generate a new one in the cabinet. In a chat that isn't linked, the bot answers nothing but a pointer to the cabinet.

What it sends

Each position gets its own thread: the first message is the open, and every add, TP update and close for that position comes as a reply to it. When the position closes, the reply carries its realized result. A position closed on the exchange without a command (its TP filled, or you closed it by hand) is closed in the thread too, a little later, when the connector notices.

In Notifications in the cabinet you choose four groups of messages, all on by default:

SwitchMessages
Signalsthe alert arrived; this message starts the position's thread
Executionsthe result of each order: filled, updated, skipped
Closesthe result of a closed position, including closes on the exchange
Issueserrors, refusals, unreadable alerts, recovered orders and other anomalies

Turn off Signals and the messages still arrive, just without threads. Keep Issues on whatever else you turn off: it's the one that tells you something went wrong.

One message ignores the switches: HEDGE OUT OF SYNC. It comes when a hedge command didn't go through in full, so the exchange no longer matches the chart. Check the position when you see it.

Commands

CommandWhat it does
/helpThe list of commands.
/accountsYour exchange accounts: the short name for commands (like binance-main), enabled or not, and the position limits.
/positionsOpen positions on all enabled accounts, with entry, mark price and floating result. /positions binance-main for one account, /positions binance for every account on Binance.
/set_long 5Sets how many long positions may be open at once (0–100). With several accounts, name one: /set_long binance-main 5.
/set_short 3The same for shorts.
/close_positions all CONFIRMEmergency. Closes every open position at market on all your accounts, switched-off ones included. /close_positions binance-main CONFIRM for one account.

/set_long 0 stops new longs on that account (adds and closes still go through). It's the gentle way to pause one side. Every message names the account it's about: acct: Binance main · binance.

The emergency close

/close_positions without CONFIRM only shows what it would do and changes nothing. CONFIRM must be in capitals; that's on purpose, so a mistyped command or an autocorrect can't close your account.

With CONFIRM, for each exchange the bot fetches the open positions, closes each at market, and answers with a summary: what was closed and what couldn't be, with the reason.

What it doesn't do: stop the strategy. The alert keeps firing, and the next signal opens a new position. To stop for real, do both: close the positions and delete the alert in TradingView (or set the limits to 0, or revoke the key).