How do the 'AND', 'OR' and 'NOT' blocks work?

A key component of the strategy builder is the 'logic block'. Users many times need to combine two or more indicators to build a strategy.  A logic block helps a user combine different condition blocks to create complex strategies.

There are 3 kinds of logic blocks:

AND Block

The 'AND block' is a logic block that helps users apply an 'AND' condition between two or more condition blocks. Users can connect multiple blocks with an 'AND' block. The block will trigger an event only if all of the blocks connected to it trigger an event for that period.

 

OR Block

The 'OR block' is a logic block that helps users apply an 'OR' condition between two condition blocks. Users can connect multiple blocks with an 'OR' block. The block will trigger an event if at least one the blocks connected to it trigger an event for that period.

 

 

 

NOT Block

The 'NOT' block helps users define a negation condition. This is useful when users want to define conditions like 'Buy when EMA is not less than 2%'. A 'NOT' block can have only 1 input and 1 output. It can be combined with other logical blocks directly.

All logic blocks can also be connected to each other to create more complicated blocks.

Sample strategy conditions:

Below are a few examples of how a strategy condition can be set up 

Condition 1:

Trigger an event when either Close price < 5% or EMA(10) > 500 or RSI>60.

Condition 2:

Trigger an event when either Close price < 5% or( EMA(10) > 500 and RSI>60)

Condition 3:

Trigger an event when pattern 'Marubozu' not triggered and EMA>2%

Use And, Or, Not, and many more blocks in our no-code builder to create your trading strategies. Join Mudrex Today!

Was this article helpful?
12 out of 14 found this helpful