Is it possible to add function ( Close all position and cbot )
Not sure why you would want to close the risk manager, as the alarm turns off once fired, if you are talking about a 3rd party cBot, it is not possible.