> For the complete documentation index, see [llms.txt](https://docs.cdzv.com/code-zero-visual-trading_en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cdzv.com/code-zero-visual-trading_en/cdzv-toolkit/indicators/switch.md).

# 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="/files/CSxIkLveHeOn0eJIOej8" 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="/files/ioZ3WVNvT05cs2CSkn4G" 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="/files/VM2CNhfpE0NZMFAXPDFA" alt="" width="563"><figcaption></figcaption></figure>
