# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cdzv.com/code-zero-visual-trading_en/cdzv-toolkit/indicators/switch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
