The robots will close the trade either when they hit the TP, SL or they receive a signal from the indicators from the underlying strategy. In your case the last happened and that’s why the trade was closed.
Marin Stoyanov
Algo Trading Space team