The WHEN Block is used to perform certain actions WHEN specific trading signals / market conditions occurs. Trading signals can be based on studies available in the Market Studies Block and/or the Portfolio Studies Block.
For more information, please review: WHEN Block Documentation