Alerts

The Alerts system is one of the most advanced features of the Momentum Concepts [AlgoAlpha] indicator. 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-confluence bullish trend entry. Your rules might be:

  1. The overall market momentum must be bullish (Momentum Impulse is green).

  2. The shorter-term momentum must also be bullish (Scalper's Momentum is green).

  3. A bullish reversal signal must appear on the Fast Oscillator, signaling a "buy the dip" opportunity.

You would configure this as a 3-step alert:

  • Step 1: Condition = Momentum Impulse Osc Greater Than Zero [State]

  • Step 2: Condition = Scalpers Momentum Above Zero [State]

  • Step 3: Condition = Fast Osc Bullish Reversal Signal [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: Fast Osc Bullish Reversal Signal [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: Momentum Impulse Osc Greater Than Zero [State]. This is true for as long as the Momentum Impulse Oscillator remains above the zero line.

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:

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

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

  • 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 Momentum Concepts 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.

  2. Under 'Condition', select 'Momentum Concepts [AlgoAlpha]', and then 'Any alert() function call'.

  3. 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 Momentum Concepts 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 square 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.

  • 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 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.

Momentum Concepts: Available Alert Condition Options

Fast Oscillator

Condition Option
Description

Fast Osc Trending Up [Trigger]

Triggers when the Fast Oscillator's main line crosses above its trend line, indicating a shift to bullish momentum.

Fast Osc Trending Down [Trigger]

Triggers when the Fast Oscillator's main line crosses below its trend line, indicating a shift to bearish momentum.

Fast Osc Cross Over Zero Line [Trigger]

Triggers when the Fast Oscillator crosses above the zero line.

Fast Osc Cross Under Zero Line [Trigger]

Triggers when the Fast Oscillator crosses below the zero line.

Fast Osc Overbought [Trigger]

Triggers when the Fast Oscillator crosses above the inner overbought level (minval).

Fast Osc Oversold [Trigger]

Triggers when the Fast Oscillator crosses below the inner oversold level (-minval).

Fast Osc Bullish Reversal Signal [Trigger]

Triggers for a '▲' signal, indicating a potential bullish reversal from an oversold condition.

Fast Osc Bearish Reversal Signal [Trigger]

Triggers for a '▼' signal, indicating a potential bearish reversal from an overbought condition.

Fast Osc Bullish Diminishing Momentum [Trigger]

Triggers for a '●' signal, warning of weakening bearish momentum while the oscillator is still negative.

Fast Osc Bearish Diminishing Momentum [Trigger]

Triggers for a '●' signal, warning of weakening bullish momentum while the oscillator is still positive.

Fast Osc Bullish Divergence [Trigger]

Triggers when a regular or hidden bullish divergence is detected on the Fast Oscillator.

Fast Osc Bearish Divergence [Trigger]

Triggers when a regular or hidden bearish divergence is detected on the Fast Oscillator.

Fast Osc Above Zero [State]

True as long as the Fast Oscillator's value is positive.

Fast Osc Below Zero [State]

True as long as the Fast Oscillator's value is negative.

Fast Osc Trending Up [State]

True as long as the Fast Oscillator's main line is above its trend line.

Fast Osc Trending Down [State]

True as long as the Fast Oscillator's main line is below its trend line.

Fast Osc Overbought [State]

True as long as the Fast Oscillator is above the inner overbought level (minval).

Fast Osc Oversold [State]

True as long as the Fast Oscillator is below the inner oversold level (-minval).

Scalper's Momentum

Condition Option
Description

Scalpers Momentum Bullish [Trigger]

Triggers when the Scalper's Momentum plot crosses above the zero line (turns green).

Scalpers Momentum Bearish [Trigger]

Triggers when the Scalper's Momentum plot crosses below the zero line (turns red).

Scalpers Momentum Weakening Bullish [Trigger]

Triggers when bullish momentum begins to decrease (green plot starts falling but is still positive).

Scalpers Momentum Weakening Bearish [Trigger]

Triggers when bearish momentum begins to decrease (red plot starts rising but is still negative).

Scalpers Momentum Strengthening Bullish [Trigger]

Triggers when bullish momentum begins to increase (green plot starts rising).

Scalpers Momentum Strengthening Bearish [Trigger]

Triggers when bearish momentum begins to increase (red plot starts falling).

Scalpers Momentum Above Zero [State]

True as long as the Scalper's Momentum plot is positive (green).

Scalpers Momentum Below Zero [State]

True as long as the Scalper's Momentum plot is negative (red).

Scalpers Momentum Weakening Bullish [State]

True while bullish momentum is present but decreasing.

Scalpers Momentum Weakening Bearish [State]

True while bearish momentum is present but decreasing.

Scalpers Momentum Strengthening Bullish [State]

True while bullish momentum is increasing.

Scalpers Momentum Strengthening Bearish [State]

True while bearish momentum is increasing.

Momentum Impulse Oscillator

Condition Option
Description

Momentum Impulse Oscillator Bullish [Trigger]

Triggers when the MIO crosses above the zero line.

Momentum Impulse Oscillator Bearish [Trigger]

Triggers when the MIO crosses below the zero line.

Momentum Impulse Oscillator Bullish Impulse [Trigger]

Triggers when the MIO crosses above the upper impulse threshold (if enabled).

Momentum Impulse Oscillator Bearish Impulse [Trigger]

Triggers when the MIO crosses below the lower impulse threshold (if enabled).

Momentum Impulse Osc Greater Than Zero [State]

True as long as the MIO is positive (green/gray).

Momentum Impulse Osc Less Than Zero [State]

True as long as the MIO is negative (red/gray).

Momentum Impulse Osc Bullish Impulse [State]

True while the MIO is above the upper impulse threshold (strong green).

Momentum Impulse Osc Bearish Impulse [State]

True while the MIO is below the lower impulse threshold (strong red).

Hidden Liquidity Flow

Condition Option
Description

Hidden Liquidity Flow Bullish [Trigger]

Triggers when the HLF main area crosses above the zero line.

Hidden Liquidity Flow Bearish [Trigger]

Triggers when the HLF main area crosses below the zero line.

Excess Hidden Liquidity Flow Bullish [Trigger]

Triggers when the Excess HLF plot crosses above the zero line, indicating a liquidity release.

Excess Hidden Liquidity Flow Bearish [Trigger]

Triggers when the Excess HLF plot crosses below the zero line, indicating a liquidity squeeze.

Hidden Liquidity Flow Greater Than Zero [State]

True as long as the main HLF area is positive.

Hidden Liquidity Flow Less Than Zero [State]

True as long as the main HLF area is negative.

Excess Hidden Liquidity Flow Bullish [State]

True as long as the Excess HLF plot is positive.

Excess Hidden Liquidity Flow Bearish [State]

True as long as the Excess HLF plot is negative.

External Conditions

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