Code Zero Visual Trading for TradingView


SWITCH is a "remote control".

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.


When a signal enters the channel, the previous value that was memorized is updated.

If multiple conditions are triggered simultaneously, SWITCH can choose:

  • "FIRST": the first incoming value.

  • "LAST": the last incoming value.

The SWITCH module has two outputs:

  • One shows which channel is currently working.

  • The other gives the specific value that this channel transmits.

Last updated