> ## Documentation Index
> Fetch the complete documentation index at: https://docs.luxalgo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alerts

<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden' }}>
  <iframe
    style={{
  position: 'absolute',
  top: 0,
  left: 0,
  width: '100%',
  height: '100%',
}}
    src="https://www.youtube.com/embed/olKQq5XR5S0"
    frameBorder="0"
    allowFullScreen
  />
</div>

The Price Action Concepts® can alert users for multiple events relevant to the existing features in the toolkit. To learn more about how to set alerts in general see [how to create alerts on tradingview](/docs/getting-started/tradingview-alerts).

<Note>
  In order for an alert to work in the toolkit make sure the related feature is enabled
</Note>

## Any Alert() Function Call

Users can create a single alert for multiple conditions using the *any alert() function call* alert condition. Conditions users want to be alerted for are grouped by the type of features they affect (structures, volumetric order blocks, imbalances...etc) and are located at the bottom of the toolkit settings.

Once conditions are toggled on users only need to set an alert using the *any alert() function call* as condition.

<img src="https://mintcdn.com/luxalgo/fwDpVLIFpofJkOq8/public/images/lux-pa/alerts/set.png?fit=max&auto=format&n=fwDpVLIFpofJkOq8&q=85&s=eee76e31ae30ba262732344e50026e03" alt="" width="758" height="311" data-path="public/images/lux-pa/alerts/set.png" />

### Any Alert() Function Call Message

Users can set a custom message that will be used when an any alert() function call condition is triggered in the message field below the list of conditions. Users can use placeholders to customize messages and return useful information, the following placeholders are supported:

#### Symbol Placeholders

| Placeholder  | Description                                             | Example                         |
| ------------ | ------------------------------------------------------- | ------------------------------- |
| `{default}`  | Default message associated with the trigerred condition | `"Mitigated Bullish Imbalance"` |
| `{ticker}`   | Symbol ticker without the exchange prefix               | `"MSFT"`                        |
| `{exchange}` | Symbol exchange/data source                             | `"COINBASE"`                    |
| `{sector}`   | Sector of the symbol, `na` if the symbol has no sector  | `"Technology Services"`         |
| `{market}`   | Symbol market type                                      | `"Stocks"`                      |

#### Time Placeholders

| Placeholder | Description                                                                            | Example           |
| ----------- | -------------------------------------------------------------------------------------- | ----------------- |
| `{tf}`      | Chart timeframe, includes "S" for seconds, "D" for days, "W" for weeks, "M" for months | `"15"`            |
| `{time}`    | Unix time in milliseconds in exchange timezone                                         | `"1705331385158"` |
| `{year}`    | Current year in exchange timezone                                                      | `"2024"`          |
| `{month}`   | Current month in exchange timezone                                                     | `"7"`             |
| `{day}`     | Current day of the month in exchange timezone                                          | `"21"`            |

#### Data Placeholders

| Placeholder        | Description                                   | Example    |
| ------------------ | --------------------------------------------- | ---------- |
| `{open}`           | Opening price                                 | `"1.2145"` |
| `{high}`           | High price                                    | `"1.2357"` |
| `{low}`            | Low price                                     | `"1.1983"` |
| `{close}`          | Closing price                                 | `"1.0569"` |
| `{volume}`         | Current volume                                | `"45216"`  |
| `{ob_buy_volume}`  | Most recent order block internal buy volume   | `"560"`    |
| `{ob_sell_volume}` | Most recent order block internal sell volume  | `"480"`    |
| `{ob_volume}`      | Most recent order block total internal volume | `"1040"`   |

### Format as JSON

Use the following message template to receive "any alert() function call" messages in the JSON format:

```json theme={null}
{
  "alert": "{default}",
  "ticker": "{ticker}",
  "tf": "{tf}",
  "ohlcv":{
    "open": {open},
    "high": {high},
    "low": {low},
    "close": {close},
    "volume": {volume},
    "order block buy volume": {ob_buy_volume},
    "order block sell volume": {ob_sell_volume},
    "order block total volume": {ob_volume}
  },
  "bartime": {time}
}
```

## Custom Alert Creator

<img src="https://mintcdn.com/luxalgo/fwDpVLIFpofJkOq8/public/images/lux-pa/alerts/custom.png?fit=max&auto=format&n=fwDpVLIFpofJkOq8&q=85&s=aac447d01bec3bce80b0ae476ef16894" alt="" width="846" height="727" data-path="public/images/lux-pa/alerts/custom.png" />

Users wishing to construct more complex alerts using features within the toolkit and/or external indicators can use the **Custom Alert Creator**.

The custom alert creator allows alerting when various user-set conditions are met or when a sequence of conditions is complete.

<Tip>
  A user wishing to be alerted when any internal market structure occurs within 1AM and 5AM of the symbol timezone could do it as follows:

  <img src="https://mintcdn.com/luxalgo/fwDpVLIFpofJkOq8/public/images/lux-pa/alerts/custom_example.png?fit=max&auto=format&n=fwDpVLIFpofJkOq8&q=85&s=682bfac30414de48532b6115fd93e063" alt="" width="830" height="830" data-path="public/images/lux-pa/alerts/custom_example.png" />
</Tip>

A custom alert can be triggered as an *any alert() function call* if the setting is selected or as a regular alert when selected in the Tradingview alert creator menu.

### Steps

Steps allow creating a sequence of conditions, which when met trigger an alert. When a condition with a step equal to 1 is met the next condition associated with step 2 will be evaluated (if enabled) and so on for higher steps (if any).

Conditions with the same associated step will require both conditions to be true in order for the condition associated with a higher step (if any) to be evaluated. This allows certain conditions to act as filters.

<Tip>
  A user wishing to be alerted when the price enters a bullish imbalance after any internal bullish market structure could do it as follows:

  <img src="https://mintcdn.com/luxalgo/fwDpVLIFpofJkOq8/public/images/lux-pa/alerts/step_example.png?fit=max&auto=format&n=fwDpVLIFpofJkOq8&q=85&s=712ffe3bd52c09cd71229db2f6e84e0c" alt="" width="847" height="281" data-path="public/images/lux-pa/alerts/step_example.png" />

  *Make sure internal market structures and imbalances are enabled*.
</Tip>

<Warning>
  Make sure steps are set such that they form a linear sequence. For example, if the lowest step is 2 or if the set steps are only 1 and 3 an error will be returned.
</Warning>

#### OR Step Operator

The "OR" step operator can be used to get alerted for any additional condition using "OR" as a step, in addition to other set custom alert conditions.

Conditions using the "OR" step can be highlighted using a different color, which can be set from the Custom Alert Creator settings. Users can choose the location of this visual element (top or bottom of the chart).

#### All Step Operator

The "All" step operator can be used to filter any set "Step" condition, including "OR" and "Invalidate".

This step operator can be useful if all the steps in a sequence needs to obey a specific rule.

<Tip>
  If a user has 2 steps set, and requires both of these to occur at a specific time interval such as 9am to 1pm, then we can use a "Session" condition using the "All" step, requiring our step 1 and step 2 to be occur between 9am and 1pm.
</Tip>

#### Invalidate Step

The "Invalidate" step allows to set a condition as an "invalidation condition". When this condition is triggered while a sequence of conditions is incomplete, the sequence will restart at step 1.

If multiple steps are set as "Invalidate" any of the conditions being true will reset the sequence of conditions, as such not all of them are required to be true for the sequence of conditions to reset.

<Card title="Example">
  Let's take an example where we use 2 regular steps and one "Invalidate" step. The alert will trigger when step 2 trigger after step 1 has been triggered.

  <Steps>
    <Step title="Step 1">
      Step 1 condition trigger, we will now evaluate step 2 from now on.
    </Step>

    <Step title="Invalidation Step">
      Invalidation step condition trigger, we reset the sequence and evaluate step 1 just after.
    </Step>
  </Steps>
</Card>

### Invalidation Behaviors

Invalidation behaviors allows adding more restrictions to a sequence of conditions, users can use two different invalidation behaviors described below:

#### Invalidate On Step 1

The "Invalidate On Step 1" behavior allows to reset an incomplete sequence of conditions when the condition on step 1 trigger. This prevents the first step condition from happening in between other steps of the condition sequence.

This behavior is useful when the first step of our sequence of conditions needs to never be repeated during the sequence.

<Card title="Example">
  Let's take an example where we use 3 regular steps.

  <Steps>
    <Step title="Step 1">
      Step 1 condition trigger, we will now evaluate step 2 from now on.
    </Step>

    <Step title="Step 2">
      Step 2 condition trigger, we will now evaluate step 3 from now on.
    </Step>

    <Step title="Step 1 Trigger">
      Step 1 condition trigger, we start evaluating step 2 from now.
    </Step>
  </Steps>
</Card>

#### Invalidate On Any Repeated Step

The "Invalidate On Any Repeated Step" behavior allows to reset an incomplete sequence of conditions when a step is triggered such that it does not respect the set order of conditions.

This behavior is useful when we want a perfectly ordered sequence of conditions to complete, without any step repeating itself.

<Card title="Example">
  Let's take an example where we use 3 regular steps.

  <Steps>
    <Step title="Step 1">
      Step 1 condition trigger, we will now evaluate step 2 from now on.
    </Step>

    <Step title="Step 2">
      Step 2 condition trigger, we will now evaluate step 3 from now on.
    </Step>

    <Step title="Step 1 or 2 Trigger">
      Step 1 or 2 conditions trigger, we start evaluating step 1 from now.
    </Step>
  </Steps>
</Card>

### Maximum Step Interval

Users can determine what is the maximum allowed horizontal distance (in bars) between two steps by enabling the "Maximum Step Interval" setting. This allows restricting steps separated by a large amount of bars.

If the amount of bars since a step exceed the set threshold, then the conditions sequence is reset, and we start evaluating from step 1 again.

### Highlight On Chart

When a custom alert condition is set, a visual element is displayed at the bottom of the chart in order to more easily visualize when the custom alert condition occurs (displayed by default).

## Alerts Reference

***

### Pre-Set Alerts

| Alert                       | Description                                                                        |
| --------------------------- | ---------------------------------------------------------------------------------- |
| Bullish I-BOS               | Triggers on the event of an internal bullish break of structure (BOS)              |
| Bullish I-CHOCH             | Triggers on the event of an internal bullish change of character (CHOCH)           |
| Bullish I-CHOCH+            | Triggers on the event of a Supported internal bullish change of character (CHOCH+) |
| Bearish I-BOS               | Triggers on the event of an internal bearish break of structure (BOS)              |
| Bearish I-CHOCH             | Triggers on the event of an internal bearish change of character (CHOCH)           |
| Bearish I-CHOCH+            | Triggers on the event of a Supported internal bearish change of character (CHOCH+) |
| Bullish S-BOS               | Triggers on the event of a swing bullish break of structure (BOS)                  |
| Bullish S-CHOCH             | Triggers on the event of a swing bullish change of character (CHOCH)               |
| Bullish S-CHOCH+            | Triggers on the event of a Supported swing bullish change of character (CHOCH+)    |
| Bearish S-BOS               | Triggers on the event of a swing bearish break of structure (BOS)                  |
| Bearish S-CHOCH             | Triggers on the event of a swing bearish change of character (CHOCH)               |
| Bearish S-CHOCH+            | Triggers on the event of a Supported swing bearish change of character (CHOCH+)    |
| Equal Highs                 | Triggers on the event of an equal high (EQH)                                       |
| Equal Lows                  | Triggers on the event of an equal low (EQL)                                        |
| Bullish OB Created          | Triggers when a new bullish order block is created                                 |
| Bearish OB Created          | Triggers when a new bearish order block is created                                 |
| Bullish OB Mitigated        | Triggers when a bullish order block (visible or not) is mitigated                  |
| Bearish OB Mitigated        | Triggers when a bearish order block (visible or not) is mitigated                  |
| Bullish Breaker             | Triggers when a bullish order block (visible or not) becomes a breaker block       |
| Bearish Breaker             | Triggers when a bearish order block (visible or not) becomes a breaker block       |
| Within Bullish OB           | Triggers when the price is located within a bullish order block (visible or not)   |
| Within Bearish OB           | Triggers when the price is located within a bearish order block (visible or not)   |
| Bullish OB Entered          | Triggers when the price enters a bullish order block (visible or not)              |
| Bearish OB Entered          | Triggers when the price enters a bearish order block (visible or not)              |
| Bullish Imbalance           | Triggers when a new bullish imbalance is detected                                  |
| Bearish Imbalance           | Triggers when a new bearish imbalance is detected                                  |
| Bullish Imbalance Mitigated | Triggers when a bullish imbalance (visible or not) is mitigated                    |
| Bearish Imbalance Mitigated | Triggers when a bearish imbalance (visible or not) is mitigated                    |
| Broken Uptrendline          | Triggers when an upward trendline is broken                                        |
| Broken Downtrendline        | Triggers when a downward trendline is broken                                       |
| Bullish Grab                | Triggers when a new bullish liquidity grab is detected                             |
| Bearish Grab                | Triggers when a new bearish liquidity grab is detected                             |
| Custom Alert Condition      | Triggers on the event of a user set custom alert condition being true              |

### Any alert() Function Call

***

export const Exclamation = ({tooltip}) => <Tooltip tip={tooltip}>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="16" height="16" fill="gray">
            <path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" />
        </svg>
    </Tooltip>;

#### Custom Alert Creator

| Alert                                | Description                                                           | Default                                                   |
| ------------------------------------ | --------------------------------------------------------------------- | --------------------------------------------------------- |
| Trigger as any alert() function call | Triggers on the event of a user set custom alert condition being true | <Exclamation tooltip="Custom step condition triggered" /> |

#### Market Structures

| Alert            | Description                                                                        | Default                                                  |
| ---------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Bullish I-BOS    | Triggers on the event of an internal bullish break of structure (BOS)              | <Exclamation tooltip="Internal bullish BOS formed" />    |
| Swing BOS        | Triggers on the event of a swing bullish break of structure (BOS)                  | <Exclamation tooltip="Bullish BOS formed" />             |
| Bearish I-BOS    | Triggers on the event of an internal bearish break of structure (BOS)              | <Exclamation tooltip="Internal bearish BOS formed" />    |
| Swing BOS        | Triggers on the event of a swing bearish break of structure (BOS)                  | <Exclamation tooltip="Bearish BOS formed" />             |
| Bullish I-CHOCH  | Triggers on the event of an internal bullish change of character (CHOCH)           | <Exclamation tooltip="Internal bullish CHoCH formed" />  |
| Swing CHOCH      | Triggers on the event of a swing bullish change of character (CHOCH)               | <Exclamation tooltip="Bullish CHoCH formed" />           |
| Bullish I-CHOCH+ | Triggers on the event of a Supported internal bullish change of character (CHOCH+) | <Exclamation tooltip="Internal bullish CHoCH+ formed" /> |
| Swing CHOCH+     | Triggers on the event of a Supported swing bullish change of character (CHOCH+)    | <Exclamation tooltip="Bullish CHoCH+ formed" />          |
| Bearish I-CHOCH  | Triggers on the event of an internal bearish change of character (CHOCH)           | <Exclamation tooltip="Internal bearish CHoCH formed" />  |
| Swing CHOCH      | Triggers on the event of a swing bearish change of character (CHOCH)               | <Exclamation tooltip="Bearish CHoCH formed" />           |
| Bearish I-CHOCH+ | Triggers on the event of a Supported internal bearish change of character (CHOCH+) | <Exclamation tooltip="Internal bearish CHoCH+ formed" /> |
| Swing CHOCH+     | Triggers on the event of a Supported swing bearish change of character (CHOCH+)    | <Exclamation tooltip="Bearish CHoCH+ formed" />          |

#### Volumetric Order Blocks

| Alert                | Description                                                                      | Default                                                               |
| -------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| Bullish OB           | Triggers when a new bullish order block is created                               | <Exclamation tooltip="New Bullish Order Block [top, bottom]" />       |
| Bearish OB           | Triggers when a new bearish order block is created                               | <Exclamation tooltip="New Bearish Order Block [top, bottom]" />       |
| Bullish OB Mitigated | Triggers when a bullish order block (visible or not) is mitigated                | <Exclamation tooltip="Bullish Order Block Mitigated [top, bottom]" /> |
| Bearish OB Mitigated | Triggers when a bearish order block (visible or not) is mitigated                | <Exclamation tooltip="Bearish Order Block Mitigated [top, bottom]" /> |
| Bullish Breaker      | Triggers when a bullish order block (visible or not) becomes a breaker block     | <Exclamation tooltip="New Bullish Breaker Block [top, bottom]" />     |
| Bearish Breaker      | Triggers when a bearish order block (visible or not) becomes a breaker block     | <Exclamation tooltip="New Bearish Breaker Block [top, bottom]" />     |
| Within Bullish OB    | Triggers when the price is located within a bullish order block (visible or not) | <Exclamation tooltip="Within Bullish Block [top, bottom]" />          |
| Within Bearish OB    | Triggers when the price is located within a bearish order block (visible or not) | <Exclamation tooltip="Within Bearish Block [top, bottom]" />          |
| Bullish OB Entered   | Triggers when the price enters a bullish order block (visible or not)            | <Exclamation tooltip="Bullish Block Entered [top, bottom]" />         |
| Bearish OB Entered   | Triggers when the price enters a bearish order block (visible or not)            | <Exclamation tooltip="Bearish Block Entered [top, bottom]" />         |
| Bullish OB Exited    | Triggers when the price exits a bullish order block                              | <Exclamation tooltip="Exit Bullish Block [top, bottom]" />            |
| Bearish OB Exited    | Triggers when the price exits a bearish order block                              | <Exclamation tooltip="Exit Bearish Block [top, bottom]" />            |

#### Imbalances

| Alert                       | Description                                                              | Default                                               |
| --------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------- |
| Any New Imbalance           | Triggers when a bullish or bearish imbalance is identified               | <Exclamation tooltip="Any New Bullish Imbalance" />   |
| Bullish New Imbalance       | Triggers when a bullish imbalance is identified                          | <Exclamation tooltip="Bullish Imbalance" />           |
| Bearish New Imbalance       | Triggers when a bearish imbalance is identified                          | <Exclamation tooltip="Bearish Imbalance" />           |
| Any Imbalance Mitigated     | Triggers when a bullish or bearish imbalance is mitigated                | <Exclamation tooltip="Mitigated imbalance" />         |
| Bullish Imbalance Mitigated | Triggers when a bullish imbalance is mitigated                           | <Exclamation tooltip="Mitigated bullish imbalance" /> |
| Bearish Imbalance Mitigated | Triggers when a bearish imbalance is mitigated                           | <Exclamation tooltip="Mitigated bearish imbalance" /> |
| Within Any Imbalance        | Triggers when the price is located within a bullish or bearish imbalance | <Exclamation tooltip="Within imbalance" />            |
| Within Bullish Imbalance    | Triggers when the price is located within a bullish imbalance            | <Exclamation tooltip="Within bullish imbalance" />    |
| Within Bearish Imbalance    | Triggers when the price is located within a bearish imbalance            | <Exclamation tooltip="Within bearish imbalance" />    |
| Any Imbalance Entered       | Triggers when the price enters a bullish or bearish imbalance            | <Exclamation tooltip="Entered imbalance" />           |
| Bullish Imbalance Entered   | Triggers when the price enters a bullish imbalance                       | <Exclamation tooltip="Entered bullish imbalance" />   |
| Bearish Imbalance Entered   | Triggers when the price enters a bearish imbalance                       | <Exclamation tooltip="Entered bearish imbalance" />   |
| Bullish Imbalance Exited    | Triggers when the price exits a bullish imbalance                        | <Exclamation tooltip="Exit bullish imbalance" />      |
| Bearish Imbalance Exited    | Triggers when the price exits a bearish imbalance                        | <Exclamation tooltip="Exit bearish imbalance" />      |

#### Liquidity Concepts

| Alert                | Description                                               | Default                                              |
| -------------------- | --------------------------------------------------------- | ---------------------------------------------------- |
| Up-Trendline Break   | Triggers when the price breaks above an upward trendline  | <Exclamation tooltip="Price broke up-trendline" />   |
| Down-Trendline Break | Triggers when the price breaks below a downward trendline | <Exclamation tooltip="Price broke down-trendline" /> |
| Detected Pattern     | Triggers when a user-set chart pattern is identified      | <Exclamation tooltip="Pattern detected" />           |
| Equal High           | Triggers when a new equal high is detected                | <Exclamation tooltip="Equal highs formed" />         |
| Equal Low            | Triggers when a new equal low is detected                 | <Exclamation tooltip="Equal lows formed" />          |
| Bullish Grab         | Triggers when a bullish liquidity grab occurs             | <Exclamation tooltip="Bullish grab" />               |
| Bearish Grab         | Triggers when a bearish liquidity grab occurs             | <Exclamation tooltip="Bearish grab" />               |
