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 4 kinds of logic blocks:
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.
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.
The 'AND' and 'OR' blocks help you apply multiple conditions together however they are fairly restrictive. The 'AND' block requires only all the connected conditions to be true and the 'OR' block requires just one. The 'ANY' block helps resolve that by helping you trigger an event when any 'n' of the connected conditions blocks are true.
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
Trigger an event when either Close price < 5% or EMA(10) > 500 or RSI>60.
Trigger an event when either Close price < 5% or( EMA(10) > 500 and RSI>60)
Trigger an event when pattern 'Marubozu' not triggered and EMA>2%