I assume it's possible to program on IBKR to automatically attach a (lets say 2%) Stop-Loss market order to every order coming in through API (algotrading). Customer service not very helpful.... Thanks for any detailed advice how and where on TWS to program that.
You can use the Bracket Order When the order is triggered, the Target and Stop Order will be created automatically. Stop order - You can set it based on %, or number of ticks/points