¸
Walt, for the take profit you dont need to write code or any macro. Some simple formulas in Excel could do it. if you use the IB Excel API sample.
For the trail it's another story because you need to keep in memory where is the trail. For that you need some visual basic code with a macro...