Thanks guys for your support so far,my new project is a Robot that manages all positions when other Robots fail due to an error.The robot will only modify the stoploss of all positions on the account.I want to know how this will affect the other Robots if active on same account especially the last Robot you helped me with.
Since this robot will modify all positions in the account then it will affect all positions even the ones that have been opened (or will be opened) by the still active robots.
If you want the fail-safe robot to only manage the positions opened by the robots that failed then you may do it by writing their position id's to a file on the OnError event and then stop the robot with the Stop() method.
The fail-safe robot can read this file and keep track of the positions modified thus far in a list.
The other robots will also need to implement lists with all active positions, unless each robot opens only one position at a time.
Reading from a file is also done in a simple way. We will add an example that reads and writes to a file.
This logic may not allow for much flexibility, since it stops the robot OnError and that does not mean that the robot has failed. You may implement this according to your desired strategy and ask us for any help that you need.