QUOTE:
As I understand it, if a BuyAtStop (as well as BuyAtLimit) is not filled in the current bar then it is cancelled.
Not really.
First, Trading Alerts by Strategies using weekly, monthly, or larger scales are placed as Good Til Canceled (GTC). (That means if you're trading Weekly bars, for example, and generate a new set of Alerts on Friday night, you should probably cancel all your active orders for the previous week and then enter the new set of orders.)
Any other scale is a "Day order"...
If you're not Auto-Trading, an order will remain Active until it's filled, you cancel it, or at the end of day.
If you are Auto-Trading, an order will remain Active until it's filled, you cancel it, at the end of day, or
if the Strategy doesn't keep them open on the next bar. In other words, the way to cancel an order is to not send one (create an Alert)! You don't have to do anything special for that, it's exactly how [just about] any Strategy's logic already works.