What does it do?

It's simple software. Basically Traderelay waits for alerts/messages from your TradingView.com strategy. When a message is received it is sent to the real exchange. Currently Traderelay supports STOCK trading in Interactive Brokers and Crypto trading in Binance (actually USDT-futures).

Available Commands

Here's a list of the currently available COMMANDS you can use in your TradingView.com strategies:

Command Explanation Exchange
action:LONG symbol:AMD qt:1 id:xxxxx
Market order: Buy long AMD stocks, quantity 1 IB
action:SHORT symbol:AMD qt:1 id:xxxxx
Market order: Sell short AMD stocks, quantity 1 IB
action:CLOSE symbol:AMD id:xxxxx
Market order: Close all open positions on AMD stocks IB
action:LONG symbol:ETHUSDT qt:1 id:xxxxx
Market order: Buy long ETHUSDT, quantity 1 Binance
action:SHORT symbol:ETHUSDT qt:1 id:xxxxx
Market order: Sell short ETHUSDT, quantity 1 Binance
action:CLOSE symbol:ETHUSDT id:xxxxx
Market order: Close all open positions on ETHUSDT Binance

Command Syntax Explained

Each command follows a specific format with required parameters:

Basic Command Structure

action:[ACTION] symbol:[SYMBOL] qt:[QUANTITY] id:[ID]
  • action: The trading action (LONG, SHORT, or CLOSE)
  • symbol: The trading instrument (e.g., AMD, ETHUSDT)
  • qt: Quantity to trade (only required for LONG/SHORT)
  • id: Your unique identifier for tracking

Interactive Brokers Examples

  • Buy 100 shares of AAPL: action:LONG symbol:AAPL qt:100 id:trade001
  • Short 50 shares of TSLA: action:SHORT symbol:TSLA qt:50 id:trade002
  • Close all MSFT positions: action:CLOSE symbol:MSFT id:trade003

Binance Futures Examples

  • Buy 0.1 BTC futures: action:LONG symbol:BTCUSDT qt:0.1 id:crypto001
  • Short 1 ETH futures: action:SHORT symbol:ETHUSDT qt:1 id:crypto002
  • Close all ADA positions: action:CLOSE symbol:ADAUSDT id:crypto003

Important Notes

  • Exchange Detection: Traderelay automatically detects which exchange to use based on the symbol format
  • Stock Symbols: Use standard ticker symbols (AMD, AAPL, TSLA) for Interactive Brokers
  • Crypto Symbols: Use USDT futures pairs (BTCUSDT, ETHUSDT) for Binance
  • Quantity Format: Stocks use whole numbers, crypto can use decimals
  • ID Parameter: Always include a unique ID for tracking and logging purposes
  • Case Sensitivity: Commands are case-insensitive (LONG = long = Long)

Common Questions

Can I use fractional shares for stocks?

This depends on your Interactive Brokers account settings. Traderelay will send the exact quantity you specify.

What happens if I use the wrong symbol format?

The order will be rejected. Make sure to use the correct symbol format for each exchange (stocks: AMD, crypto: ETHUSDT).

Do I need different Traderelay instances for different exchanges?

No, one Traderelay instance can handle both Interactive Brokers and Binance simultaneously if both are configured.

Can I modify the quantity after sending a command?

No, commands are executed immediately. You would need to send a new CLOSE command and then a new LONG/SHORT command with the desired quantity.