TradeReign
Back to HomeEducation HubCompatibilityAboutDisclosures
thinkorswim Desktop

thinkorswim Study Alerts Once Per Bar vs. After the Close

If the chart went through your level and no message arrived, check what your saved condition evaluates. A live price, a completed candle and a notification record answer three different questions.

Quick Answer

In thinkScript, Alert.BAR limits a local chart alert to once per bar. In MarketWatch → Alerts → Study Alert, you choose a symbol, study condition, aggregation and notification. For a completed-bar signal, build the condition from the previous completed bar with close[1].

Start 7-Day TrialCompare the wick and the closeSet up a MarketWatch Study AlertTroubleshoot a missing alert

When does Alert.BAR fire?

Alert.BAR gives a local alert at most once per bar when its condition is true. In the example script, close on the forming bar can update with a new quote. The condition checks whether the current value is above the level, so it can fire while the bar is forming. It can also fire on successive bars that stay above the level. A crossing condition adds a comparison with the earlier value.

In the fictional chart, A covers 10:00–10:05 a.m. ET. It trades up to 6,000.75 and closes at 5,999.75. A live above-level alert can qualify during A. A rule that requires a completed close above 6,000.00 fails for A. The candle high proves price went above the level in this exercise. It does not give the exact alert timestamp.

B covers 10:10–10:15 a.m. ET and closes at 6,000.50. The preceding bar closed at 5,999.50. On the next bar, close[1] is B and close[2] is the candle before it, so a completed-close cross qualifies. Record the condition bar separately from the time thinkorswim evaluates it or delivers the message.

A price touch and a confirmed close

Synthetic MES 5-minute candles. Times are bar closes in ET.

A trades above 6,000.00 and closes below it. B closes above it after the preceding bar closed below. The completed-close condition first qualifies when the next bar starts evaluating.

Local chart study that checks the developing bar

input level = 6000.00;
def above = close > level;
Alert(above, "Price above level", Alert.BAR, Sound.Ding);

Create a MarketWatch Study Alert that checks a completed candle

Open MarketWatch → Alerts, choose the exact symbol and select Study Alert. Choose a compatible study or use the thinkScript editor for a custom condition. Schwab requires a Study Alert study to have exactly one plot. The example below produces a single Boolean plot.

In Condition Setup, set the aggregation to five minutes and select TRUE for the Boolean condition. Set the notification and activation or expiry options, then click Create. Use a level near the current price for a practice check on your own symbol. The example’s 6,000.00 is fictional and produces no signal on instruments trading far from that level.

The expression uses two completed closes and can first become true when the next bar is available. It evaluates false on later bars that merely remain above the level. The timestamp can differ from the close of the candle you checked, so compare both records in the same time zone.

Single-plot condition for Study Alert

input level = 6000.00;
plot confirmed = close[1] > level and close[2] <= level;

Why a thinkorswim Study Alert or notification didn’t arrive

Match the exact symbol, contract month, aggregation and session against the chart. Use the condition’s threshold and its comparison bars. If a five-minute alert is being checked on a one-minute chart, open the original five-minute view and check the same completed bars first.

For a MarketWatch alert, open the Alert Book and check its activation, status and expiration. If it triggered, check the selected notification channel and its settings. If it is still active with no trigger, check the condition and the bars it evaluated. For a local chart alert, open the study’s Alerts settings to verify the sound and Message Center selections.

If a study is unavailable in the wizard, try a minimal one-plot condition. Once it behaves as expected, add the original inputs back one at a time. Record the observed timestamp and condition result before testing the next change.

Sources

Official References

Platform details on this page were checked against these official resources.

Schwab thinkScript Alert functionAlert condition, frequency and sound.Schwab thinkScript recalculation rulesDefault per-quote recalculation and the once-per-bar declaration.Schwab thinkScript historical bar referencesRead earlier candles using square brackets.Schwab MarketWatch Study AlertsCondition Setup, aggregation and the one-plot requirement.Schwab Alert Book and notificationsAlert lifecycle and delivery options.
Related Guides

Keep Building the Rule System

Reconcile an hourly Stock Hacker scan with the chart

Compare filter aggregation, EXT and the actual completed candle.

Use daily and five-minute filters in Stock Hacker

Check when the two filters can run independently and when you need a chart study.

Set the first thinkorswim hourly candle’s start

Check the extended-hours setting and compare the first candle on two hourly grids.

Check the aggregation on a thinkorswim TICK chart

Compare the same opening window at one and five minutes.

Compare TradingView futures alert settings

Check wick triggers, completed candles and delivery.

Set up NinjaTrader Desktop chart alerts

Check the condition, message and rearm setting.

FAQ

Common Questions

Does Alert.BAR wait for the candle to close?

Alert.BAR controls how many times an alert can fire in a bar. The condition controls the values it reads. Use a previous-bar reference such as close[1] to read a completed candle.

Why is my local alert silent even when the condition is true?

thinkScript Alert uses Sound.NoSound by default. Check the study’s sound and Message Center settings and confirm the condition qualifies on the chart.

Can I use a multi-plot indicator in a MarketWatch Study Alert?

Schwab’s Study Alerts help specifies exactly one plot for a study. Create a single Boolean output that represents your condition.

Risk Disclosure

Futures trading contains substantial risk and is not suitable for every investor. TradeReign is a trading-discipline and rule-enforcement application. It does not provide trading advice, trade signals, investment recommendations, or performance guarantees.

TradeReign is not a broker-dealer, futures commission merchant, or investment advisor.

Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital - money that can be lost without jeopardizing financial security or lifestyle - should be used for trading. Past performance is not necessarily indicative of future results.