Comment on page
Condition block is the most important component of any trading robot scheme. The condition block can be used to perform various checks. For example, you can check that all conditions for opening a long position are met and do certain actions depending on the check result.
The condition block has 1 input and 2 outputs.
The first output is activated if the condition is true, the second output is activated if the condition is false
Let's place 3 blocks in the condition block: 2 "value input" blocks and 1 "greater" operator block:
In this case, the condition is of course true, so the first output will be activated.
Let's put 3 more blocks on the scheme: the event block "Robot launch" and 2 "Journal message" blocks. Link these blocks as shown below:
Generate the code of the robot by pressing the "~" key, compile the generated code and launch this robot in the terminal.
As expected, the "true" message was printed to the terminal journal.