Reduce false signals by syncing trend bias and entry timing with TradingView multi-timeframe alerts. Automate your futures bot using Pine Script and webhooks.

TradingView multi-timeframe alerts let a futures bot react to confirmation across higher and lower timeframes before sending an order. The setup combines Pine Script logic that references multiple resolutions, a single consolidated alert, and a webhook payload that routes to your broker through an automation platform. Done correctly, you reduce false signals while keeping execution latency in the millisecond range.
request.security() to pull higher-timeframe context into a single alert condition rather than firing alerts on each timeframe separately.A multi-timeframe alert is a single TradingView alert that only fires when conditions on two or more chart resolutions agree. For a futures bot, this means the alert ties higher-timeframe trend context to lower-timeframe entry triggers, then sends one webhook payload to your automation platform when both align.
The point is filtering noise. A 5-minute breakout on ES futures looks different when the 1-hour chart is in a downtrend. By requiring agreement across timeframes inside the alert condition itself, you avoid sending the bot conflicting signals or chasing every wiggle on the lower chart.
Multi-Timeframe Alert: A TradingView alert whose condition evaluates data from more than one chart resolution before firing. It matters for futures automation because it lets you encode trend bias and entry timing into a single, deterministic signal the bot can act on.
Pick one timeframe for trend bias and one for entry timing, then write the condition so the entry only fires when bias agrees. A common pairing for ES and NQ futures is a 1-hour bias filter with 5-minute or 15-minute entries.
The design question is which signal owns which job. Higher timeframes answer "should I be long or short today?" Lower timeframes answer "is right now a reasonable entry?" If you flip these or check them on the same timeframe, the filter does nothing.
Confirmation Logic: The set of rules that requires multiple independent conditions to be true before a trade signal triggers. For multi-timeframe alerts, this typically means a directional bias on one resolution combined with a trigger pattern on a faster resolution.
Pine Script's request.security() function pulls data from any timeframe into the current chart's script. You evaluate both timeframes in one script, build a single boolean condition, and attach the alert to that condition.
Here is the basic skeleton most futures traders start with:
//@version=6
strategy("MTF Bot Signal", overlay=true)
// Higher timeframe bias
htf_ema = request.security(syminfo.tickerid, "60", ta.ema(close, 50))
bias_long = close > htf_ema
bias_short = close < htf_ema
// Lower timeframe trigger
fast_ema = ta.ema(close, 9)
slow_ema = ta.ema(close, 21)
cross_up = ta.crossover(fast_ema, slow_ema)
cross_dn = ta.crossunder(fast_ema, slow_ema)
// Combined condition
long_signal = bias_long and cross_up
short_signal = bias_short and cross_dn
alertcondition(long_signal, title="Long", message='{"action":"buy","symbol":"{{ticker}}","qty":1,"secret":"YOUR_TOKEN"}')
alertcondition(short_signal, title="Short", message='{"action":"sell","symbol":"{{ticker}}","qty":1,"secret":"YOUR_TOKEN"}')
A few things to verify. Set lookahead=barmerge.lookahead_off if you use lookahead in request.security(); otherwise your backtest will look better than live results. Also confirm the alert is set to "Once Per Bar Close" in the alert dialog, not "Once Per Bar," to prevent intrabar repainting from triggering early.
For deeper Pine details, the Pine Script automation guide walks through alert condition syntax and the Pine Script v6 features overview covers newer functions worth using.
The webhook URL goes in the alert's notification settings, and the JSON payload sits in the alert message field. The bot platform receives the POST request, validates the secret token, and translates the JSON into a broker order.
A workable payload for futures looks like this:
{
"secret": "your_long_random_string",
"action": "buy",
"symbol": "ESZ2025",
"quantity": 1,
"order_type": "market",
"stop_loss": 8,
"take_profit": 16,
"timeframe": "5m",
"strategy_id": "mtf_es_v1"
}
TradingView placeholders like {{ticker}}, {{close}}, {{strategy.order.action}}, and {{timenow}} can be embedded directly inside the JSON string so each alert carries live values. The full JSON payload format reference lists every variable TradingView supports.
Webhook URL: The unique HTTPS endpoint your automation platform provides to receive alert messages from TradingView. It matters because it is the only path between your chart logic and live broker execution, so its security and uptime directly affect your bot.
Keep the secret token long and random. Anyone who learns the URL plus token can fire orders into your account, so treat it like a password. The webhook security guide covers token rotation and IP whitelisting.
From signal to fill, the path is: bar closes on TradingView, alert condition evaluates true, TradingView sends the JSON to the webhook URL, the automation platform validates the payload, the platform routes the order through your broker's API, and the broker fills at market or limit.
End-to-end latency on a well-configured stack runs roughly 50-500ms total. TradingView's outbound delivery is typically under 1 second, broker API submission adds another 3-40ms, and the rest depends on broker matching and market conditions during the fill.
StepTypical LatencyFailure RiskBar close to alert fire<100msVery lowTradingView to webhook delivery200-800msServer load, plan tierPlatform validation and parsing5-20msMalformed JSONBroker API submission3-40msAPI rate limitsExchange match and fillVariableLiquidity, slippage
Platforms like ClearEdge Trading sit between TradingView and your broker, handling the JSON parsing and order routing. Average platform-side execution runs 3-40ms depending on broker connection.
TradingView's alert limits depend on your subscription. Essential includes 20 active alerts, Plus offers 100, Premium gives you 400, and Ultimate raises it further. Webhook notifications require Essential or higher, not the free plan.
For multi-timeframe futures bots, alert count usually matters less than alert quality. One well-designed consolidated alert per strategy beats five sloppy ones. If you trade ES, NQ, GC, and CL with one strategy each, four alerts cover the whole rotation.
Alert Frequency Limit: The cap TradingView places on how often a single alert can re-trigger, typically governed by "Once Per Bar," "Once Per Bar Close," or "Only Once" settings. It matters because picking the wrong setting can fire duplicate orders mid-bar or miss valid signals entirely.
When alerts fail, the cause is almost always one of four things: webhook URL mistyped, JSON malformed, alert expired, or the chart symbol does not match the bot's symbol mapping. Check these in order before assuming the platform is down.
TradingView alerts also expire. Free and Essential alerts expire after about two months of inactivity unless renewed. Premium alerts last longer, but check the expiry date in the alert manager monthly. The alert expiration guide covers renewal automation.
The webhook troubleshooting guide walks through each of these steps with example logs.
{{ticker}} and let the platform handle continuous contracts, or update alerts before each rollover.No, Essential and Plus both support webhook alerts and request.security() calls. Premium just gives you more concurrent alerts and longer alert lifespans, which matters more if you run many strategies than for the multi-timeframe logic itself.
Yes, you can use one alert tied to a combined condition and branch the JSON payload based on which side fired, but most traders find it cleaner to create separate long and short alerts. Separate alerts make logs easier to read and reduce the chance of a payload error sending the wrong direction.
A 1-hour or 4-hour bias filter combined with 5-minute or 15-minute entries is the most common pairing for index futures. The exact choice depends on your strategy's holding period; scalpers may use 15m bias with 1m entries while swing setups use daily bias with hourly entries.
Set the alert to "Once Per Bar Close" and have your automation platform deduplicate by strategy ID and timestamp. Most platforms reject a second identical payload received within a few seconds, but verifying this in your platform's settings is worth the minute it takes.
No, TradingView is the source of the alert, so an outage means no alert fires and no order goes out. Some traders run backup logic on their broker platform or use a second alert source for critical strategies, but for most retail futures bots a single alert path is acceptable.
Yes, as long as your prop firm permits API and webhook automation, which most modern futures prop firms do. Confirm the firm's rules on news trading, daily loss limits, and consistency requirements first; the prop firm automation guide covers the rule sets for major firms.
Multi-timeframe alerts work because they encode confirmation directly into the signal, so the bot only sees trades where bias and trigger agree. The mechanics come down to one Pine Script with request.security(), one consolidated alert per strategy, and a JSON webhook with a secret token routing to your broker.
Paper trade the setup first, forward-test on MES or MNQ before scaling to ES or NQ, and review your alert logs weekly. For a deeper walkthrough of the full TradingView automation stack, see the TradingView automation pillar guide.
Want to dig deeper? Read our complete guide to TradingView automation for more detailed setup instructions and strategies.
Disclaimer: This article is for educational purposes only. It is not trading advice. ClearEdge Trading executes trades based on your rules, it does not provide signals or recommendations.
Risk Warning: Futures trading involves substantial risk. You could lose more than your initial investment. Past performance does not guarantee future results. Only trade with capital you can afford to lose.
CFTC RULE 4.41: Hypothetical results have limitations and do not represent actual trading.
By: ClearEdge Trading Team | About
Every week, we break down real strategies from traders with 100+ years of combined experience, so you can skip the line and trade without emotion.
