"Close and Cancel Position" is block used to closed open positions and or to cancel pending orders. It manage positions and orders using Position variable type.
Either working with positions or with pending orders, the use should pay attention to the status of the variable:
- Positions to be closed should be in "Filled" status otherwise an error occur.
- Orders to be cancelled should be in "Opened" status otherwise the same error occur.
Examples of use available in Documentation section: