RUNA LABS
DOCUMENTATION
Mastering the automated execution pipeline.
The core of Runa Labs is our low-latency signal routing engine. This section explains exactly how to set up your strategies in the Lab, link your accounts, and format your TradingView alerts to ensure perfect execution.
Before TradingView can send trades, the Bridge needs to know your strategy exists. Navigate to the Lab tab, type a name (e.g., 'BTC Momentum'), and click Register. It is now ready to receive webhooks.
Once registered, you must tell the engine which of your exchange accounts should actually trade when the signal fires.
Runa Labs allows for two entirely different methods of position sizing:
There are two kinds of alert. Entry alerts open or add to a position and carry your stop-loss / take-profit. Exit alerts close a position and MUST be marked reduce-only.
Entry alert — paste this into your entry alert's message box (fill sl/tp from your script, or leave empty to skip):
1 2 3 4 5 6 7 8 9 10 11 12{ "user_token": "YOUR_RUNA_TOKEN", "account_name": "MATCH_STRATEGY", "strategy": "Your Strategy Name", "ticker": "{{ticker}}", "action": "{{strategy.order.action}}", "market_position": "{{strategy.market_position}}", "price": "{{close}}", "qty": "{{strategy.order.contracts}}", "sl": "", "tp": "" }
Exit / close alert — paste this into your exit/close alert's message box. The "reduce_only": true flag guarantees the order can ONLY close an existing position — it can never open a new one:
1 2 3 4 5 6 7 8 9{ "user_token": "YOUR_RUNA_TOKEN", "account_name": "MATCH_STRATEGY", "strategy": "Your Strategy Name", "ticker": "{{ticker}}", "action": "{{strategy.order.action}}", "price": "{{close}}", "reduce_only": true }
Why reduce_only matters: without it, an exit signal that arrives when the position is already gone (e.g. the entry was rejected, or the exchange stop already closed it) would be read as a fresh market order and OPEN a brand-new position in the wrong direction. With reduce_only:true the bridge fully flattens the position (any size, including DCA'd/pyramided) and cancels leftover SL/TP legs — and if you're already flat, it's a safe no-op.
The Golden Rule: Notice the 'account_name': 'MATCH_STRATEGY' field. This tells the Bridge to act like a radio tower. When the signal hits, the Bridge broadcasts the trade to ALL accounts linked to that strategy name. If you change this to a specific account name, the trade routes only to that one account instead of being shared.
Each strategy row has a set of icon buttons in the Action column. Hover over any icon to see its tooltip. Here is what each one does:
Link (green): Opens the account-linking dialog so you can connect an exchange account to this strategy.
Braces (gray): Copies the pre-filled ENTRY webhook JSON payload for this strategy to your clipboard.
Log-out (gray): Copies the EXIT / CLOSE payload (reduce-only) for this strategy — use it on your exit alerts so a close can never open a reverse position.
Flask — ghost (violet): Deletes the backtest data for this strategy (stats and chart). The strategy itself is kept.
Chart (orange): Clears the internal trade log stats. Does not touch any positions or orders on the exchange.
Trash (red): Permanently deletes the strategy. Linked accounts are unsubscribed automatically.
You can attach a verified backtest to any strategy, giving subscribers — and yourself — transparent performance data before going live.
If you have built a profitable algorithm, you can share it privately with your accepted friends — there is no public marketplace. Friends you have shared with can then subscribe to your strategy, applying their own custom Fixed Sizing rules to follow your trades. See the Friends & Copy Trading guide for how to build your circle.
A critical concept in automated execution is state synchronization. If you link your account to a strategy while it is already in the middle of an active trade, your account will be out of sync. To solve this, Runa Labs includes an Auto-Sync feature.
How Auto-Sync Works: When you link an account, you will be prompted with an Auto-Sync warning. If the strategy is currently holding a position, accepting this warning tells the Bridge to instantly fire a Market Order to synchronize your account with the strategy's current state.
Understanding the risks:
Disclaimer: The content provided by Runa Labs is for informational and educational purposes only and does not constitute financial, investment, or trading advice. Runa Labs is not a registered financial advisor and does not hold any financial licenses. All trading and investment activities involve significant risk of loss. You are solely responsible for your own financial decisions. The Service is a technical execution dashboard for sophisticated, eligible traders. It is not available to U.S. persons or to residents of sanctioned or restricted jurisdictions — see the Terms of Service for the current list.