Blog · Feature · updated 2026-09-25
Batch Build: strategies, indicators and multi-condition alerts in the TensorTrader extension
How the extension's Batch Create wizard turns one indicator or strategy into dozens of TradingView alerts: signal sources, AND-combined indicators, variable alignment, DCA across timeframes, leverage modes and duplicate-proof runs.
One wizard, every alert
Setting up TradingView alerts by hand means one dialog per token, per direction, per timeframe, and each needs a webhook message that TensorTrader can read. The extension's Batch Create tab (we call the workflow Batch Build) does all of that from one screen. You choose exchange keys, paste tokens, pick a signal source from your own TradingView favorites, and the wizard plans every alert, shows you the plan, and creates it exactly once.
At the top, "Create alerts on" chooses the charting platform: TradingView, GoCharting or TrendSpider. This article follows TradingView, which has the richest options. The GoCharting and TrendSpider panels reuse the same DCA, leverage and risk sections. Step numbers renumber themselves as optional panels appear, so the labels below match what you see.
1 · Exchanges and 2 · Tokens
Step 1 lists every exchange key you saved in TensorTrader as a toggle. Testnet keys and live keys have different colors, and a single key is selected for you. Step 2 takes one base token per line: BTC, ETH, SOL. You can also upload a .csv or .txt. Quote suffixes are stripped for you, so XMRUSDT becomes XMR, but tokens like WBTC stay intact. A trailing 3X on a line sets that token's leverage multiple. CSV headers can carry exchange, direction, action, confidence and a per-token max leverage.
Each token is matched to a real TradingView chart feed. The status line reads "N tokens parsed · N matched a TradingView feed", and anything unmatched is listed as skipped before you create anything. With an Interactive Brokers key selected, the token box turns into a securities picker with autocomplete (AAPL, QQQ, Apple Inc) and ±Nx chips that route to leveraged or inverse ETFs.
3 · Signal source: indicator or strategy
Press Load favorites and two dropdowns fill from your TradingView favorites: Indicators and Strategies. Whichever dropdown you changed last is the active script. The Alert mechanism is auto-detected from the script, and you can override it:
- Indicator condition (per-direction)
- The script exposes alertconditions. One alert per direction, long and short.
- Strategy orders
- A strategy favorite. One alert that follows the strategy's own entries and exits.
- Any alert() function call
- The script only uses alert(). One alert per token.
Multi-indicator alerts (AND logic)
In indicator mode, Add indicator (AND) adds another indicator slot once the previous one is filled. You can stack up to five. The wizard combines them into one TradingView multi-condition alert that fires only when every condition is true on the shared timeframe. That needs a TradingView Plus plan or higher. The alert name joins the study names with "+" so you can tell them apart later. If TradingView reports that the account's multi-condition quota is used up, the batch stops and reconciles instead of creating half a plan.
Each slot keeps its own input overrides. Expand a slot and the Source Inputs card, "TradingView inputs for: {name}", shows that script's inputs grouped the way the Pine author grouped them: checkboxes, color pickers, dropdowns, dates and numbers. Inputs that make no sense for automation, such as calculation settings and account risk, are hidden. Run mode is pre-set to Alert, and capital fields are pre-filled from your account.
Variable alignment: mapping plots to long and short
Per-direction indicator alerts need to know which condition means "open long" and which means "open short". Press Align variables and the wizard proposes a mapping by reading the script's plot titles: long, buy, bull, cross up and golden cross for longs, and the mirror words for shorts. Conditions defined as alertconditions are marked ◆, and when a script has them, only they can be chosen. Anything left "— unmapped —" blocks the run with "Align variables for {name}". AI assist appears when a direction is still unmapped. The checkbox "Create both long & short per token" is on by default. Untick it and each row follows its CSV action or direction column instead.
Strategies: properties and templates
With a strategy as the source, a Strategy Properties card appears. It holds initial capital (from the exchange), base currency, default order size (a fixed USD size that also totals the DCA margin), pyramiding orders (extra pyramids + 1), commission 0.03 and run mode ALERT. The Template dropdown is the webhook message template, not a trading template: indicator_v6 or strategy_v6. The strategy template carries TradingView's {{strategy.order.action}} and {{strategy.market_position}} placeholders so the order direction comes from the strategy itself.
The Webhook payload card defaults to Guided TensorTrader JSON. Advanced custom JSON lets you edit the message, validates it, and offers placeholder chips: common TradingView fields like {{ticker}} and {{close}}, indicator plots like {{plot_0}}, strategy orders, and TensorTrader variables like {{tt.leverage}} that are filled in for each alert.
DCA across timeframes
Batch Build has no separate timeframe picker. Multiple timeframes come from DCA Across Timeframes, which is on by default. Choose a Base timeframe, a TF spectrum (default 1, 5, 15, 60, 240, 720, 1440 minutes) and a number of Extra pyramids. Each extra pyramid adds a leg on the next timeframe out, alternating above and below the base. Legs closer to the base get more weight: each weight is 1/(distance + 1), normalized so they add up to 100%. Total margin USD (default 100) is split by weight, and every leg's USD margin can be edited. If the legs no longer add up, you get a warning. Badges show the alert count, your remaining TradingView quota, and "N tokens × N TF legs". A plan larger than your quota is cut down, and the extra alerts are listed as skipped.
Leverage and risk
The ceiling is either the TensorTrader cap (10x) or the exchange max per token. Poll max leverage fetches the exchange maximums. Interactive Brokers and Alpaca always run at 1x. For risk, strategies can keep their own defaults, hand SL/TP to TensorTrader's dynamic management, or use fail-safe brackets only. Indicators get one checkbox, "TT manages dynamic SL/TP", which is on by default.
- Market breadth (scaled live)
- The default. The alert carries a base multiplier and a cap, and leverage ramps from the base toward the cap as the market leans with the trade.
- Signal confidence / full max
- With a CSV confidence column, leverage scales from 1x at 50% confidence to the max at 100%. Without one, the alert carries the token max.
- Static fixed cap
- Clamped to the lower of your cap, the token max and the platform max.
Review & run, without duplicates
The plan roster lists every alert before anything is written: symbol, exchange and key, timeframe, action, leverage and margin. It also says why the run button is disabled, if it is. Alert names follow "TT <TOKEN> <studies> <action> <exchange:key> <timeframe>", and that name plus the symbol and timeframe forms the alert's identity. When you press Create N alerts, the runner:
- 1Drops duplicate planned alerts, and refuses to start if another batch is running.
- 2Reads your existing TradingView alerts first, and aborts if it cannot.
- 3Skips alerts that already exist. They are reported as "already existed", and you delete old alerts first if you want new settings.
- 4Creates each alert once, with no blind retries, 750 ms apart.
- 5Checks the first alert after 6 seconds. If TradingView reports a study_error, it deletes that alert and stops, suggesting "Any alert() function call".
- 6Stops on a rate limit, waits, then reconciles.
- 7Ends with a reconciliation sweep that deletes extra copies and recomputes every result from what actually exists on TradingView.
After the batch
Manage what you created in the extension's Alerts tab. You can filter by token, exchange, timeframe, study or status, select all filtered or invert the selection, and enable, disable or delete in bulk. Tuned per-regime cells live in the TT-Autotune tab, which has its own enrollment flow.