IB has trailing orders in both profit taking - REL and a stop loss order type
or TRAIL
i havent experimented but i think instead of letting amibroker manage the code for trail order and using ibc.ModifyOrder() to repeatedly modify the values it is better if you can tell ib to do the trailing itself as this trailing is native to the broker and more reliable rather than amibroker managing the code.
if you can make this sort of code please send me a copy of the same code at
[email protected]
i am in the process of making this sort of code right now.