Alerts

The Alerts system is one of the most advanced features of the Smart Signals Assistant. It transforms the indicator from a simple visual guide into a fully automated monitoring tool. Instead of watching the charts all day, you can build a precise set of rules and have TradingView notify you only when your exact conditions are met.

The system is built on a flexible, multi-step, multi-condition logic engine. You can combine triggers (events that happen on a single bar) and states (ongoing conditions) from any of the indicator's components to create highly specific and personalized alert criteria.


The Logic Engine: Steps and Conditions

The alert engine is structured around a sequence of up to 7 Steps. For an alert to fire, all configured steps must be completed in order. Each step, in turn, can be composed of multiple Conditions.

  • Step: A stage in your alert sequence. Step 1 must be completed before the system starts looking for Step 2, and so on.

  • Condition: A specific rule that must be met. You can assign up to 12 different conditions to the various steps.

  • Boolean Operator (AND/OR): Within a single step, you can combine multiple conditions using AND (all conditions must be true) or OR (at least one condition must be true).

Hint: How the Alert Logic Works

The alert system evaluates conditions for any given step in a specific order. Understanding this is key to building complex alerts correctly.

  • Hierarchy is by Number: The system processes conditions based on their input number (Condition 1, then Condition 2, then 3, and so on), not the order you enable them.

  • Boolean Chaining: The AND/OR boolean operator for a condition connects it to the logical expression that comes before it in the sequence.

  • First Boolean is Ignored: Because of this chaining, the boolean setting for the very first enabled condition in any step's sequence is always ignored, as there is no expression before it to connect to (this is why Condition 1 has no boolean input option).

Example: Imagine for Step 1 you enable:

  • Condition 2 (set to OR)

  • Condition 4 (set to AND)

  • Condition 5 (set to OR)

The final logic will be evaluated as: (Condition 2) AND (Condition 4) OR (Condition 5).

The OR from Condition 2 was ignored. The logic used the AND from Condition 4 and the OR from Condition 5.

Example Scenario: Imagine you want an alert for a high-probability bullish reversal. Your rules might be:

  1. The market must be in a Trending regime (TRC is blue).

  2. The price must have just left the Firmament Support Cloud.

  3. A Smart Signals Bullish Reversal signal (â–²) must appear.

You would configure this as a 3-step alert:

  • Step 1: Condition = Market Is Trending [State]

  • Step 2: Condition = Price Exits Lower Cloud [Trigger]

  • Step 3: Condition = Smart Signals Turns Bullish [Trigger]

The alert will only fire if these three events happen in this exact sequence.


Condition Types: Triggers vs. States

It's crucial to understand the difference between a Trigger and a State.

  • Trigger Conditions: These are events that happen on a single bar. They are "true" for only one moment.

    • Example: Smart Signals Turns Bullish [Trigger]. This is only true on the exact bar where the â–² appears.

  • State Conditions: These are ongoing conditions that can be true for many bars.

    • Example: FVT In Bullish Trend [State]. This is true for as long as the Fair Value Trail remains blue.

See below for a full list of all the avaible states and triggers and what they do

Best Practice: A robust alert often combines states and triggers. Use state conditions in the earlier steps to define the ideal market environment, and use a trigger condition in the final step to signal your entry.


External Conditions

The system allows you to incorporate up to five External Conditions. This powerful feature lets you use data from any other indicator on your chart (or even price itself) as part of your alert logic.

For each external signal, you can define:

  1. Source: The data to be evaluated (e.g., the plot of an RSI, a Moving Average, etc.).

  2. Condition: The comparison type (e.g., Greater than, Lesser than, crossover, etc.).

  3. Value: The threshold to compare against (e.g., a specific value like 50 for an RSI).

This opens up limitless possibilities for confluence, allowing you to integrate your favorite indicators directly into the Smart Signals Assistant's alert engine.


Setting Alerts on TradingView

After configuring your desired conditions on our indicator's settings, here's how to set it up on TradingView.

  1. Click on the clock icon at the right hand side of your TradingView chart

  1. Under 'Condition', select 'AlgoAlpha - 🧠Smart Signals....', and 'Any alert() function call'

  1. Click 'Create'

Tip: You can create multiple alerts by first configuring the conditions on our indicator, then creating an alert following the steps above, after the 'create' button is pressed, you can open the Smart Signals Assistant settings again and change the conditions for your next alert, the previously created alert will be saved and won't be affected by the settings changes.


Settings Reference: Alerts Group

  • Show Historical Alerts: When enabled, the indicator will plot a shaded line at the bottom of the chart (red for trigger, gray for no trigger) to show where your custom alert conditions would have fired in the past. This is an invaluable tool for backtesting and refining your alert rules without having to wait for them to trigger in real-time.

  • Invalidation Type: Defines how and when an in-progress alert sequence is reset.

    • Time Interval: The sequence resets if too much time (a set number of bars) passes between steps.

    • Strict Sequence: The sequence resets if a later step triggers before an earlier one.

    • Invalidate on Step 1: The entire sequence resets if the conditions for Step 1 trigger again before the full sequence is complete.

  • Reset Timeout (bars): Used with the Time Interval invalidation type. Sets the maximum number of bars allowed to pass before the sequence is cancelled.

  • Condition 1-12 Settings:

    • Enable Checkbox: Activates or deactivates this condition.

    • Condition Type: The dropdown menu where you select the specific trigger or state from any of the indicator's components (Smart Signals, FVT, Trend Spine, etc.) or an External Signal.

    • Boolean: (AND/OR) Defines how this condition relates to other conditions within the same step. (Excluding Condition 1)

    • Step: Assigns this condition to one of the steps (7 max) in the sequence.

  • Alert Frequency: Determines what frequency the alerts trigger at. 'Once Per Bar Close' triggers once when the candle closes, 'Once Per Bar' triggers on the first occurrence of the conditions being met within the bar, 'Always' triggers any number of times (even within the bar) as long as the conditions are met.

  • Custom Alert Message: The text message that TradingView will send you when the alert fires. You can use special "placeholders" (e.g., {{close}}, {{ticker}}) to include dynamic information in your alert. The supported placeholders are listed below.

Placeholder
Description

{{exchange}}

Exchange code (e.g. BINANCE, NASDAQ)

{{ticker}}

Raw ticker symbol (e.g. BTCUSD, AAPL)

{{interval}}

Chart timeframe (e.g. 1 D, 5 min)

{{open}}

Open price of the triggering bar

{{high}}

High price of the triggering bar

{{low}}

Low price of the triggering bar

{{close}}

Close price of the triggering bar

{{volume}}

Volume of the triggering bar

{{time}}

Timestamp of the triggering bar (UTC ISO-8601)

{{timenow}}

Alert fire time (UTC ISO-8601)

{{syminfo.currency}}

Quote currency code (e.g. USD, USDT)

{{syminfo.basecurrency}}

Base currency code (e.g. BTC, ETH)

Smart Signals Assistant: Available Alert Condition Options

Condition Option
Description

Smart Signals Turns Normal Bullish [Trigger]

Triggers when a standard bullish signal (â–²) appears on the chart.

Smart Signals Turns Normal Bearish [Trigger]

Triggers when a standard bearish signal (â–¼) appears on the chart.

Smart Signals Normal Signal Change [Trigger]

Triggers when either a standard bullish or bearish signal appears.

Smart Signals Strong Bullish Signal [Trigger]

Triggers when a strong bullish signal (+â–²) appears, indicating higher conviction.

Smart Signals Strong Bearish Signal [Trigger]

Triggers when a strong bearish signal (+â–¼) appears, indicating higher conviction.

Smart Signals Strong Signal Change [Trigger]

Triggers when either a strong bullish or strong bearish signal appears.

Smart Signals Exit Long Positions [Trigger]

Triggers when an exit signal (x) appears during a bullish trend.

Smart Signals Exit Short Positions [Trigger]

Triggers when an exit signal (x) appears during a bearish trend.

Smart Signals Exit Any Position [Trigger]

Triggers when any exit signal (x) appears, regardless of trend direction.

Smart Signals In Bullish Direction [State]

True as long as the main trend direction is bullish (e.g., green candles).

Smart Signals In Bearish Direction [State]

True as long as the main trend direction is bearish (e.g., red candles).

Smart Signals Longs Exit Below Max Limit [State]

True if in a bullish trend and the number of exit signals is less than the Max Exit Signals setting.

Smart Signals Shorts Exit Below Max Limit [State]

True if in a bearish trend and the number of exit signals is less than the Max Exit Signals setting.

Smart Signals Any Direction Exit Below Max Limit [State]

True as long as the number of exits since the last entry is less than the Max Exit Signals setting.

Condition Option
Description

Trend Spine Turns Bullish [Trigger]

Triggers when the Trend Spine line flips from bearish/neutral (red/gray) to bullish (green).

Trend Spine Turns Bearish [Trigger]

Triggers when the Trend Spine line flips from bullish/neutral (green/gray) to bearish (red).

Trend Spine Changes Direction [Trigger]

Triggers when the Trend Spine line flips from bullish to bearish, or vice-versa.

Trend Spine In Bullish Mode [State]

True as long as the Trend Spine line is bullish (green).

Trend Spine In Bearish Mode [State]

True as long as the Trend Spine line is bearish (red).

Trend Spine In Trending Mode [State]

True as long as the Trend Spine line is either bullish (green) or bearish (red).

Trend Spine In Ranging Mode [State]

True as long as the Trend Spine line is neutral (gray).

Condition Option
Description

Trend Bias Becomes Strong Bullish [Trigger]

Triggers when bullish momentum strengthens (oscillator crosses above its MA).

Trend Bias Becomes Strong Bearish [Trigger]

Triggers when bearish momentum strengthens (oscillator crosses below its MA).

Trend Bias Becomes Strong Any Direction [Trigger]

Triggers on either of the "Becomes Strong" conditions above.

Trend Bias Becomes Weak Bullish [Trigger]

Triggers when bullish momentum weakens (oscillator crosses below its MA).

Trend Bias Becomes Weak Bearish [Trigger]

Triggers when bearish momentum weakens (oscillator crosses above its MA).

Trend Bias Becomes Weak Any Direction [Trigger]

Triggers on either of the "Becomes Weak" conditions above.

Trend Bias Is Strong Bullish [State]

True while bullish momentum is strong.

Trend Bias Is Strong Bearish [State]

True while bearish momentum is strong.

Trend Bias Is Weak Bullish [State]

True while bullish momentum is present but weakening.

Trend Bias Is Weak Bearish [State]

True while bearish momentum is present but weakening.

Trend Bias Is Any Bullish [State]

True as long as the bias oscillator is positive (bullish).

Trend Bias Is Any Bearish [State]

True as long as the bias oscillator is negative (bearish).

Condition Option
Description

Price Enters Upper Cloud [Trigger]

Triggers when price crosses up into the upper (red) cloud resistance zone.

Price Enters Lower Cloud [Trigger]

Triggers when price crosses down into the lower (green) cloud support zone.

Price Enters Any Cloud [Trigger]

Triggers on either of the "Price Enters" conditions above.

Price Exits Upper Cloud [Trigger]

Triggers when price crosses down out of the upper (red) cloud zone.

Price Exits Lower Cloud [Trigger]

Triggers when price crosses up out of the lower (green) cloud zone.

Price Exits Any Cloud [Trigger]

Triggers on either of the "Price Exits" conditions above.

Price In Upper Cloud Zone [State]

True as long as the price is inside the upper (red) cloud.

Price In Lower Cloud Zone [State]

True as long as the price is inside the lower (green) cloud.

Price In Any Cloud Zone [State]

True as long as the price is inside either the upper or lower cloud.

Price Above All Clouds [State]

True as long as the price is above the upper (red) cloud.

Price Below All Clouds [State]

True as long as the price is below the lower (green) cloud.

Price Between Cloud Bands [State]

True as long as the price is between the upper and lower clouds (in the "channel").

Condition Option
Description

Market Becomes Trending [Trigger]

Triggers at the moment the ML classifier's output flips from Ranging to Trending.

Market Becomes Ranging [Trigger]

Triggers at the moment the ML classifier's output flips from Trending to Ranging.

Market Regime Changes [Trigger]

Triggers on any flip between Trending and Ranging market states.

Market Is Trending [State]

True as long as the ML classifier identifies the market as being in a Trend.

Market Is Ranging [State]

True as long as the ML classifier identifies the market as being in a Range.

Condition Option
Description

External Signal 1 to External Signal 5

True when the user-defined condition for the corresponding external signal is met. The condition is configured in the "External Condition" inputs (source, comparison operator, and value).

Last updated