# SWITCH

{% hint style="success" %}
**Association**

**SWITCH** is a "remote control".
{% endhint %}

**SWITCH** is an indicator that works like a channel switcher. Each channel, when activated, has its own data source, which will be the result when this channel is activated.

It's like a remote control for a TV. You can "switch" between different conditions (channels). Each "channel" has its own settings:

1. "*On-Off*": choice of whether this channel is active.
2. "*Trigger (IN)*": the condition that "turns on" the channel.
3. "*Result (OUT)*": the data you receive when the channel is active.
4. "*Memory*": whether to keep the first triggered value or use the latest data.

<figure><img src="https://content.gitbook.com/content/YAV7aJldax3OC32dTSHO/blobs/fXgF6lppYjFkjZurSlPN/BTCUSDT.PDEV_ENV%202024-01-23%2023-08-35.png" alt="" width="438"><figcaption></figcaption></figure>

{% hint style="danger" %}
**Warning**

When a signal enters the channel, the previous value that was memorized is updated.
{% endhint %}

If multiple conditions are triggered simultaneously, **SWITCH** can choose:

* "*FIRST*": the first incoming value.
* "*LAST*": the last incoming value.

<figure><img src="https://content.gitbook.com/content/YAV7aJldax3OC32dTSHO/blobs/T2EsId3mcrWAfcBwugqJ/BTCUSDT.PDEV_ENV%202024-01-23%2023-12-40.png" alt="" width="473"><figcaption></figcaption></figure>

The **SWITCH** module has **two outputs**:

* One shows which channel is currently working.
* The other gives the specific value that this channel transmits.

<figure><img src="https://content.gitbook.com/content/YAV7aJldax3OC32dTSHO/blobs/6UV6d94ehtOx5oZRg7oH/BTCUSDT.PDEV_ENV%202024-01-23%2023-01-40.png" alt="" width="563"><figcaption></figcaption></figure>
