You can now send TradingView alerts to Binance CoinM thanks to the Tradingview to Anywhere tool. The bot uses human-like commands that can be combined with TradingView’s dynamic alert messages.
How to Automate TradingView script in simple steps
- Head to TradingView To Binance and scroll to the step-by-step guide to getting started.
- Create new Binance API keys. Allow Futures, Spot & Margin trading, and allow unrestricted IP access.
- Submit your API keys on the TradingView To Binance website. and follow the easy on-screen instructions provided to finish setting up your webhook.
How to Automate a TradingView Strategy to Binance COINM
For a strategy with a buy and close command only, use {{strategy.order.action}} - which returns the string “buy” or “sell” for the executed order.
For a strategy that has long, short, and close commands, use {{strategy.market_position}} - which returns the current position of the strategy in string form: “long”, “flat”, or “short”.
Specify the asset symbol to trade, the number of contracts, and the account using the TradingView to Anywhere commands.
Please note that quantity is passed as either the number of contracts or as a percentage.
For Example:
- A strategy with long and short commands only.
Close BTC/USD A=COINM
{{strategy.order.action}} BTC/USD Q=1 L=5 A=COINM
or
Close BTC/USD A=COINM
{{strategy.order.action}} BTC/USD Q=150% A=COINM
The command above will ensure that any open positions of BTCUSD are closed before executing the command from your strategy.
- A strategy with long, short, and exit commands.
{{strategy.market_position}} BTC/USD Q=1 L=10 A=COINM
or
{{strategy.market_position}} BTC/USD Q=150% A=COINM
This command will automatically enter and exit your positions so no need to type in the close command first like in the previous case.
How to Automate TradingView Indicator to Binance COINM
To automate a TradingView indicator to Binance COINM:
- Select the indicator as the condition and choose the long or short condition.
- To avoid alert duplication, select once per bar.
- Add the applicable buy/sell TradingView To Anywhere command in the message field.
For Example:
-
For a Buy condition, the command will be;
Close BTC/USD A=COINM
Buy BTC/USD Q=1 L=15 A=COINM
or
Close BTC/USD A=COINM
Buy BTC/USD Q=100% A=COINM -
For a Sell condition, the command will be;
Close BTC/USD A=COINM
Sell BTC/USD Q=1 L=5 A=COINM
or
Close BTC/USD A=COINM
Sell BTC/USD Q=150% A=COINM
Please note we include the close command before the buy/sell command to make sure that any previous open positions are closed before opening a new one.
That’s all, it is that simple!