Code Zero Visual Trading for TradingView


The IF-THEN-ELSE module is used as an input data source for other modules.


The module can be connected in a queue of conditions. To do this, you need to select the input data source that should send a signal for activation (a value greater than 0) and enable cascading mode.

The IF-THEN-ELSE module-indicator is your assistant that works on the principle of "if, then, else".

It allows you to set a condition (IF), for example, "if RSI(14) is above 70".

The condition (RULE) is set in the same way as in the CONDITION MANAGER module.

If the condition is met, the module generates a signal for a specific action (THEN), say, sends a signal to buy a stock. If the condition is not met, the module generates a signal for a different action (ELSE), for example, to send a signal to sell the stock or simply wait.

It's like a smart autopilot for your trading strategy, which automatically responds to market changes according to the rules you set. You define the scenarios, and IF-THEN-ELSE follows your instructions, ensuring disciplined and consistent decision-making.

IF-THEN-ELSE not only sends a signal when a given condition is met but also allows you to configure different data sources for each possible outcome. Thus, you can obtain specific values from these sources that were relevant at the time the condition was triggered, giving you more information for making informed trading decisions.

The module has four outputs, which signal which condition was met, THEN or ELSE.

The IF-THEN-ELSE module-indicator has the same backtesting system as the CONDITION MANAGER module.

Last updated