TradingView Webhook Session Windows and Cooldowns
Design receiver-side RTH, ETH, custom trade-window, and cooldown controls without confusing time filters with market availability or idempotency.
How should webhook session windows and cooldowns work?
Use Pine to define the strategy's signal session, HexTrade's documented `session` or `tradeWindow` fields to enforce a receiver-side time policy, and the broker as the final authority on market and account availability. Add `cooldown` only to suppress rapid repeat fills on the same account and symbol. It is not a trading session, durable idempotency key, or broker-hours guarantee.
Layering matters because each clock protects against a different problem. Pine can avoid creating signals outside the strategy's research assumptions, but a stale or misconfigured alert can still emit. A receiver-side window rejects an otherwise valid payload outside approved days and times. The broker then applies current instrument sessions, maintenance, holiday schedules, account restrictions, and order rules. No single layer should be presented as proof that all three agree.
HexTrade documents `session` with `RTH` defined as 09:30–16:00 and `ETH` as outside that window, paired with `sessionTimezone`, plus a custom `tradeWindow` containing timezone, days, start, and end. Configure an explicit timezone rather than assuming the chart, user, server, and exchange clocks match. Test boundary minutes, overnight windows, daylight-saving transitions, holidays, and alerts delayed in transit.
- Signal window: when the strategy is allowed to decide.
- Route window: when the receiver is allowed to attempt.
- Cooldown: how soon another fill on the same account and symbol may occur.
- Broker session: whether the current destination accepts this order for this instrument.
Why enforce time in both Pine and the receiver?
Pine-side filtering keeps the strategy faithful to its tested market regime, while receiver-side filtering limits damage from stale alerts, wrong inputs, delayed messages, or scripts that were not updated. Use both when timing is a risk boundary. Keep their timezone and day definitions in one reviewed specification so they reject and admit the same intended interval.
A Pine session check operates on the chart's execution context and data updates. It can prevent a signal from being constructed, which keeps logs quieter and avoids unnecessary network traffic. It cannot control an old alert snapshot whose code or inputs differ from the current chart. TradingView explicitly stores a mirror image at alert creation, so changing the visible session input does not retrofit the running instance. Recreate the alert after any approved time-rule change.
A receiver rule evaluates the request when it arrives. That catches an alert delayed across a boundary and provides a centralized constraint across several scripts. It can also reject a legitimate event if the timezone, weekday, overnight convention, or daylight-saving handling differs from Pine. Treat the two configurations as code and policy: version them, write boundary examples, and test both accepted and rejected timestamps before live use.
| Control | Best use | Cannot prove |
|---|---|---|
| Pine session condition | Keep signal generation inside researched hours | That an old alert snapshot uses the current rule |
| HexTrade `session` | Apply the documented RTH or ETH receiver policy | That the broker is open or the contract is tradable |
| HexTrade `tradeWindow` | Express custom days, start, end, and timezone | That an overnight/daylight-saving interpretation was configured correctly |
| Broker validation | Apply current venue, instrument, and account rules | That the strategy intended to trade at this time |
How do you define a custom futures trade window?
Write the timezone, included weekdays, start time, end time, and overnight convention in plain language before encoding `tradeWindow`. Decide which date owns a window that crosses midnight and what happens at exact boundaries. Then create accepted and rejected timestamp examples around open, close, weekend, daylight-saving changes, and scheduled maintenance before trusting the rule.
A phrase such as “trade the morning” is not testable. A useful specification says, for example, that a route admits selected weekdays between two local wall-clock times in an explicitly named timezone, with start inclusive and end behavior verified against product documentation or testing. Do not infer those last semantics if the docs do not state them. Use dry-run examples at one minute before, at, and after each boundary to observe actual validation safely.
Overnight futures sessions need special care because the trading session date can differ from the calendar date. A Sunday-evening opening can belong economically to Monday's session, while a custom weekday array may be interpreted by local arrival date. Rather than assume, test representative timestamps and retain the results. Exchange holiday and maintenance schedules can also close trading inside an otherwise allowed custom window, so broker acceptance remains the final separate gate.
{
"ticker": "MNQ",
"action": "buy",
"quantity": "1",
"platformType": "tradovate",
"accountId": "replace_with_exact_account_id",
"tradeWindow": {
"timezone": "America/New_York",
"days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"start": "09:35",
"end": "15:55"
},
"dryRun": true
}Treat the example as a test input, not an undocumented schema guarantee
HexTrade documents the `tradeWindow` concepts of timezone, days, start, and end. Confirm exact accepted formatting and boundary behavior with the current docs and dry-run response before live use.
What does the HexTrade webhook cooldown protect?
HexTrade documents `cooldown` as seconds before another fill on the same account and symbol. Use it to damp rapid repeated activity within that narrow scope. The docs also state that cooldown state is in-memory and that dry runs do not update its counters. Do not describe it as persistent, cross-account, cross-symbol, or equivalent to logical-event deduplication.
A cooldown can catch a burst from a repeated condition or two nearby alerts, but it can also interfere with valid strategy behavior. Scale-ins, rapid reversals, and an entry followed quickly by an exit all need explicit tests. The word “fill” in the documented description also deserves attention: design your test around observed product behavior rather than assuming the timer starts at receipt, validation, submission, or broker acceptance. If the exact start point is safety-critical, verify it in current documentation or support.
In-memory state creates an important operational caveat. Process restart can reset the counter, so the cooldown is not a permanent record of prior intent. It also does not collapse late TradingView retries after the interval. Pair it with source transition gating, event correlation, quantity caps, symbol allowlists, account monitoring, and a clear unknown-state policy. A layered control can reduce harm without being misrepresented as an exactly-once execution guarantee.
- Scope stated in docs: same account plus symbol.
- Unit stated in docs: seconds.
- Persistence stated in docs: in-memory.
- Dry-run behavior stated in docs: validation does not advance cooldown or daily counters.
What happens when delivery crosses a session boundary?
Evaluate the route at the receiver's actual arrival time unless current product documentation specifies another basis, and preserve both signal time and arrival time for diagnosis. TradingView warns that webhook delivery can be delayed, while its receiver deadline is three seconds after connection. A signal created before close can therefore arrive after the configured window or broker session changes.
Signal time answers when Pine made the decision; arrival time answers when the receiver could act. Collapsing them hides delayed-entry risk. Include a non-secret time placeholder or label for correlation, then inspect TradingView alert and receiver records. Do not backdate a late event into an allowed period simply because its chart condition occurred earlier unless the execution policy explicitly permits and tests that behavior.
At a boundary, rejection can be the correct safe result. The operator should know whether to ignore, queue, or investigate it; automatically replaying at the next open changes the strategy's entry price and market regime. Similarly, a qualifying 5xx retry arrives five seconds later and may cross the window. Receiver behavior for a resend should still respect event identity and current policy without creating a second order or silently shifting the intended session.
- 1
Record two clocks
Keep sender event time and receiver arrival time in the incident evidence.
- 2
Test both sides
Trigger controlled dry runs immediately before and after every configured boundary.
- 3
Define late-event policy
Choose reject, investigate, or another documented action; never improvise a next-session replay.
- 4
Reconcile retries
Ensure a resend crossing the boundary remains one logical event and follows a deterministic policy.
How should session and cooldown controls be rolled out?
Start with a written clock specification, add one receiver control at a time, and use dry runs to cover normal times, exact boundaries, excluded days, overnight periods, and rapid duplicate attempts. Then execute the smallest approved order inside the window and observe the first blocked and allowed live events. Recreate the TradingView alert whenever its Pine timing snapshot changes.
Build a matrix with timestamp, timezone, expected Pine decision, expected receiver decision, cooldown state, expected broker availability, and actual result. Include daylight-saving dates for every timezone involved and a contract-roll period if symbols change. A table is more reliable than visually watching a clock because it exposes disagreements among chart, receiver, and exchange assumptions before money is involved.
Commission conservatively. Keep `dryRun: true` while validating fields and windows; remember it intentionally does not advance the in-memory counters. For cooldown testing, use an environment and procedure that cannot create unwanted live orders, or coordinate with product support if no safe simulation is documented. Once enabled, monitor rejected events as well as successful ones. An unexplained block is a control defect even when it prevents a trade.
| Case | Expected route result | Evidence to retain |
|---|---|---|
| Inside window, no prior fill | Allowed to proceed to broker validation | Signal time, arrival time, timezone, dry-run plan |
| Before start or after end | Rejected by configured window | Boundary timestamp and explicit rejection |
| Excluded weekday or holiday | Window rejection or broker rejection according to configuration | Which layer rejected and why |
| Second same-account/symbol event inside cooldown | Controlled according to documented cooldown behavior | Both event fingerprints and observed counter behavior |
| Same time, different account or symbol | Test documented scope without assumption | Route values and independent outcomes |
Sources and methodology
HexTrade Research uses official product, exchange, regulator, and vendor documentation. Policies and platform behavior can change; follow the linked source and verify current terms before trading.
- 1.How to configure webhook alerts — TradingView, accessed Aug 30, 2026
- 2.Webhook resubmission — TradingView, accessed Aug 30, 2026
- 3.Pine Script alerts — TradingView, accessed Aug 30, 2026
- 4.Pine Script alerts FAQ — TradingView, accessed Aug 30, 2026
- 5.TradingView webhook automation — HexTrade Docs, accessed Aug 30, 2026
- 6.Understanding futures expiration and contract roll — CME Group, accessed Aug 30, 2026
Frequently asked questions
Does `session: "RTH"` guarantee the futures market is open?
No. HexTrade documents RTH as the receiver window 09:30–16:00. Broker and instrument availability, holidays, maintenance, and account rules remain separate. Set an explicit timezone and verify the current contract and destination at the time of execution.
Is `ETH` the same for every futures contract?
Do not make that assumption. HexTrade describes ETH as outside its documented RTH window, while actual venue sessions and maintenance differ by instrument. Use the receiver field as policy and current exchange or broker specifications as the execution authority.
Does dry run consume the cooldown?
No. HexTrade's webhook docs state that `dryRun: true` does not update cooldown or `maxTradesPerDay` counters. That makes validation safer, but it also means a sequence of dry runs cannot prove exactly how live counter state advances.
Can cooldown prevent TradingView retry duplicates?
It can suppress some close-together activity within its documented account-and-symbol scope, but it is not durable idempotency. A retry may arrive outside the interval, after restart, or through another scope. Preserve stable event identity and reconcile broker state.
Why did changing my Pine session not change the alert?
TradingView saves a snapshot of the script, inputs, chart symbol, and timeframe when the alert is created. Changing the visible chart instance does not update that running copy. Delete and recreate the alert after reviewing the new session behavior.
Next step
Put the research into a controlled workflow
Start small, verify the broker and account rules, and keep risk controls between every signal and live order.
Explore webhook automationContinue reading
Educational content only. Futures are leveraged products and can produce losses greater than the amount you expected to risk. This article is not financial, legal, or prop-firm compliance advice.