Crossing
This element is used for tracking the position of two values relative to each other. For example, to determine the moment of crossing between two lines.
The comparison is made regarding the values on two sockets Up and Down.
Incoming Sockets
- Up – values that allow comparison (for example, a numerical value, indicator value, etc.).
- Down – values that allow comparison (for example, a numerical value, indicator value, etc.).
Outgoing Sockets
- Flag – true if Up is greater than Down, otherwise false.
An example of using the Crossing block to track the crossings of two SMA indicators. Two Crossing blocks are used, and each outputs true separately depending on when the long SMA is greater than the short one and when it is less.